cron
To edit the cron jobs, do:
crontab -e
Syntax
- * * * * command to execute
┬ ┬ ┬ ┬ ┬
│ │ │ │ │
│ │ │ │ │
│ │ │ │ └───── day of week (0 - 7) (Sunday to Sunday, 0 and 7 are Sunday)
│ │ │ └────────── month (1 - 12)
│ │ └─────────────── day of the month (1 - 31)
│ └──────────────────── hour (0 - 23)
└───────────────────────── min (0 - 59)
example:
0 3 * * 0 /home/mitch/bin/ctrl-c-backup.py
0 3 means 3 AM.(minute 0, hour 3)
The first * means any day of the month.
The second * means any month.
The 0 at the end means Sunday.
You can choose any value from 0 to 7 where both 0 and 7 will represent Sunday.
NOTE: cron does not use the PATH variable, so make sure to do
chmod +x on the script, and add a crunch bang #!/usr/bin/python to tell it where the interpreter is
-----------------------------------------------------------------
Listing Cron Jobs
crontab -l
/cheatsheet/