Cheat sheets

Cron schedule examples: every 5 minutes, daily, weekly

Copy-paste cron timings for the schedules people need most, plus how to see and edit your jobs.

Handy? Press ⌘ DCtrl + D to bookmark this page for next time.

Fill these in once
  1. Open your list of scheduled jobs
    Terminal
    crontab -e
  2. Every 5 minutes
    Inside crontab
    */5 * * * * /home/you/backup.sh >> ~/cron.log 2>&1

    The five fields are: minute, hour, day of month, month, day of week.

  3. Every day at 2:30 am
    Inside crontab
    30 2 * * * /home/you/backup.sh
  4. Every Monday at 9 am
    Inside crontab
    0 9 * * 1 /home/you/backup.sh
  5. On the 1st of every month at midnight
    Inside crontab
    0 0 1 * * /home/you/backup.sh
  6. Every time the machine starts
    Inside crontab
    @reboot /home/you/backup.sh
  7. See your scheduled jobs
    Terminal
    crontab -l
  1. Open your list of scheduled jobs
    Terminal · Ubuntu / Debian
    crontab -e
  2. Every 5 minutes
    Inside crontab
    */5 * * * * /home/you/backup.sh >> ~/cron.log 2>&1

    The five fields are: minute, hour, day of month, month, day of week.

  3. Every day at 2:30 am
    Inside crontab
    30 2 * * * /home/you/backup.sh
  4. Every Monday at 9 am
    Inside crontab
    0 9 * * 1 /home/you/backup.sh
  5. On the 1st of every month at midnight
    Inside crontab
    0 0 1 * * /home/you/backup.sh
  6. Every time the machine starts
    Inside crontab
    @reboot /home/you/backup.sh
  7. See your scheduled jobs
    Terminal · Ubuntu / Debian
    crontab -l
  1. Every day at 2:30 am
    PowerShell
    schtasks /create /tn "Backup" /tr "C:\scripts\backup.ps1" /sc daily /st 02:30

    Windows uses Task Scheduler instead of cron.

  2. Every 5 minutes
    PowerShell
    schtasks /create /tn "Backup" /tr "C:\scripts\backup.ps1" /sc minute /mo 5
  3. See your scheduled tasks
    PowerShell
    schtasks /query /fo LIST /tn "Backup"
Undo it
  1. Delete the task
    PowerShell
    schtasks /delete /tn "Backup" /f