Skip to content

Instantly share code, notes, and snippets.

@xlogix
Created January 27, 2020 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xlogix/32587099b7dcac055085ea768e4a6288 to your computer and use it in GitHub Desktop.
Save xlogix/32587099b7dcac055085ea768e4a6288 to your computer and use it in GitHub Desktop.
Cron Jobs Examples
# Suppress attempts to mail output. We'll check syslog.
MAILTO=""
PYTHON=/root/bot/env/bin/python
# Kick off Payday every Thursday.
0 5 * * 4 $PYTHON /root/bot/payday.py 2>&1 | logger -t KICK-OFF-PAYDAY
# Poll for updates every minute.
* * * * * /root/bot/update.sh 2>&1 | logger -t UPDATE-BOT
# ┬ ┬ ┬ ┬
# │ │ │ │
# │ │ │ └─ 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment