top of page

Cron How to

To edit cron jobs list - crontab -e

  • To display cron jobs list - crontab -l

  • Default Directory - /var/spool/cron/crontabs

  • Each line has five time-and-date fields, followed by a command, followed by a newline character ('\n').

  • The fields are separated by spaces.

  • The five time-and-date fields cannot contain spaces.

  • The five time-and-date fields are as follows: minute (0-59), hour (0-23, 0 = midnight), day (1-31), month (1-12), weekday (0-6, 0 = Sunday).

Examples:

01 04 1 1 1 /usr/bin/somedirectory/somecommand

The above example will run /usr/bin/somedirectory/somecommand at 4:01am on January 1st plus every Monday in January.

An asterisk (*) can be used so that every instance (every hour, every weekday, every month, etc.) of a time period is used.

01 04 * * * /usr/bin/somedirectory/somecommand

The above example will run /usr/bin/somedirectory/somecommand at 4:01am on every day of every month.

Recent Posts

See All
How to Samba on Ubuntu Server

Install sudo apt install samba -y Verfiy Installation systemctl status smbd Configure sudo nano /etc/samba/smb.conf Create symbolic to...

 
 
 

Comments


Contact Me

Tel: 678-642-8051

cspeed@jcsassoc.com

  • Google+ Long Shadow
  • LinkedIn Long Shadow
  • Facebook Social Icon
  • Twitter Long Shadow

© 2005 by Christopher Speed

Your details were sent successfully!

bottom of page