Crontab: Difference between revisions
Jump to navigation
Jump to search
imported>Sjwhitak (Created page with "You run a command: {{UserCmd|rsync -r folder/ user@backup.server.lan:~/}} You want to run this every day at 2am: {{UserCmd|crontab -e}} <syntaxhighlight lang="crontab"> 0 2 * * * rsync -r folder/ user@backup.server:~/ </syntaxhighlight> Use [https://crontab.pro/ 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?...") |
No edit summary |
||
Line 21: | Line 21: | ||
{{UserCmd|crontab -e}} |
{{UserCmd|crontab -e}} |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="text"> |
||
0 1 * * * python sync.py |
0 1 * * * python sync.py |
||
0 2 * * * rsync -r folder/ user@backup.server:~/ |
0 2 * * * rsync -r folder/ user@backup.server:~/ |
Latest revision as of 20:23, 16 March 2025
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:~/