Crontab

From MTU LUG Wiki
Jump to navigation Jump to search

You run a command:

user $rsync -r folder/ user@backup.server.lan:~/

You want to run this every day at 2am:

user $crontab -e
0 2 * * * rsync -r folder/ user@backup.server:~/

Use crontab.pro to map out crontab times.

In any case, crontab will run any command you want.

You want a series of commands to be run at once? Wrap it in a bash script.

You want to run multiple commands?

user $crontab -e
0 1 * * * python sync.py
0 2 * * * rsync -r folder/ user@backup.server:~/