Advertisement
hivefans

shell-cron.sh

Mar 22nd, 2017
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.40 KB | None | 0 0
  1. #write out current crontab
  2. crontab -l > mycron
  3. #echo new cron into cron file
  4. echo "00 09 * * 1-5 echo hello" >> mycron
  5. #install new cron file
  6. crontab mycron
  7. rm mycron
  8.  
  9. * * * * * "command to be executed"
  10. - - - - -
  11. | | | | |
  12. | | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
  13. | | | ------- Month (1 - 12)
  14. | | --------- Day of month (1 - 31)
  15. | ----------- Hour (0 - 23)
  16. ------------- Minute (0 - 59)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement