How to edit crontab in Ubuntu

For more detail information,you can

man crontab

Use crontab

To open crontab

crontab -e

If you need to run commands with administrative privileges

sudo crontab -e

Open crontab with your favorite editor.(By default it’s vi or will let you choose one from list)

export EDITOR=gedit
 
crontab -e

You can append “export EDITOR=gedit” to your ~/.bashrc file if necessary.

To list crontab content

crontab -l

To remove all your cron jobs

crontab -r

 

Crontab syntax

*    *    *    *    *  command to be executed
┬    ┬    ┬    ┬    ┬
│    │    │    │    │
│    │    │    │    │
│    │    │    │    └───── day of week (0 - 6) (0 is Sunday, or use names)
│    │    │    └────────── month (1 - 12)
│    │    └─────────────── day of month (1 - 31)
│    └──────────────────── hour (0 - 23)
└───────────────────────── min (0 - 59)
  • 41 Users Found This Useful
Was this answer helpful?

Related Articles

Change of the reverse DNS record for VPS hosting and dedicated server

To change the reverse DNS record for IP address, you’ll need to contact the support department in...

Checking of open connections

If you want to see the open connections to port 25 on your virtual private server or dedicated...

Do I have full root access to my VPS

Yes you do. With virtual hosting (VPS) you get root password for access, trough which you have...

Do I have my own IP address with my virtual server

Yes you do. We provide your own IP address to each virtual private server. If you need more than...

How to create .tar.gz archive

Creating .tar.gz archive can be done with one command. Use the following: tar -pczf...