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)
  • 26 Users Found This Useful
Was this answer helpful?

Related Articles

Buy web hosting with Payza

Web Hosting and Payza Payment System When an organization or a company wants to make their...

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...

Buy web hosting with Mercado Pago

Web hosting with MercadoPago: fast and reliable Due to advances in technology, especially on the...

How to create .tar.gz archive

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

Buy web hosting with QIWI

Web Hosting with QIWI Web hosting services have become one the leading investment venture. This...