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 VPS with OKPay

Buy VPS with OKPay Providing VPS Hosting There are many reasons a person or an organization...

Buy VPS with BTCe

A bitcoin exchange is a service that enables a market for trading between the bitcoins and the...

Buy VPS with Litecoin

You can purchase a VPS from QHoster and pay with Litecoin. VPS activation is instant and you do...

Do you provide VPS backup

All VPS hosting plans are backed up on a remote location once a week. This is done for a better...

How to remove installed RPM package

If the package is installed via RPM, first find the name of the RPM package: rpm -qa | grep...