Fill these in once
- Open your list of scheduled jobs
crontab -e - Every 5 minutes
*/5 * * * * /home/you/backup.sh >> ~/cron.log 2>&1The five fields are: minute, hour, day of month, month, day of week.
- Every day at 2:30 am
30 2 * * * /home/you/backup.sh - Every Monday at 9 am
0 9 * * 1 /home/you/backup.sh - On the 1st of every month at midnight
0 0 1 * * /home/you/backup.sh - Every time the machine starts
@reboot /home/you/backup.sh - See your scheduled jobs
crontab -l
- Open your list of scheduled jobs
crontab -e - Every 5 minutes
*/5 * * * * /home/you/backup.sh >> ~/cron.log 2>&1The five fields are: minute, hour, day of month, month, day of week.
- Every day at 2:30 am
30 2 * * * /home/you/backup.sh - Every Monday at 9 am
0 9 * * 1 /home/you/backup.sh - On the 1st of every month at midnight
0 0 1 * * /home/you/backup.sh - Every time the machine starts
@reboot /home/you/backup.sh - See your scheduled jobs
crontab -l
- Every day at 2:30 am
schtasks /create /tn "Backup" /tr "C:\scripts\backup.ps1" /sc daily /st 02:30Windows uses Task Scheduler instead of cron.
- Every 5 minutes
schtasks /create /tn "Backup" /tr "C:\scripts\backup.ps1" /sc minute /mo 5 - See your scheduled tasks
schtasks /query /fo LIST /tn "Backup"
Undo it
- Delete the task
schtasks /delete /tn "Backup" /f