ubuntu cron reference


/ Published in: Bash
Save to your folder(s)

Example:
sudo -i
crontab -e

#reindex locate db daily
0 0 * * * /usr/bin/updatedb


Copy this code and paste it in your HTML
  1. # m h dom mon dow command
  2.  
  3. # MIN HOUR MDAY MON DOW COMMAND
  4.  
  5. Code:
  6. MIN = Minute 0-60 HOUR = Hour [24-hour clock] 0-23
  7. MDAY = Day of Month 1-31
  8. MON = Month 1-12 OR jan,feb,mar,apr ...
  9. DOW = Day of Week 0-6 OR sun,mon,tue,wed,thu,fri,sat COMMAND = Command to be run Any valid command-line
  10.  
  11. @reboot Run once, at startup. None
  12.  
  13. @yearly Run once a year 0 0 1 1 *
  14.  
  15. @annually (same as @yearly) 0 0 1 1 *
  16.  
  17. @monthly Run once a month 0 0 1 * *
  18.  
  19. @weekly Run once a week 0 0 * * 0
  20.  
  21. @daily Run once a day 0 0 * * *
  22.  
  23. @midnight (same as @daily) 0 0 * * *
  24.  
  25. @hourly Run once an hour 0 * * * *

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.