
crontab 和 windows schedule

crontab

示例

# configuration of cvs & news server
# cvs and news backup
30 6 1 * * /usr/local/bin/backup.sh /opt/news/spool /home/ftp/news/spool full
30 5 * * * /usr/local/bin/backup.sh /opt/news/spool /home/ftp/news/spool inc
30 3 * * 1 /usr/local/bin/backup.sh /opt/cvs-repos/repos-r /home/ftp/cvs full
30 4 * * 1 /usr/local/bin/backup.sh /opt/cvs-repos/repos-user /home/ftp/cvs full
0 11,14,17,19,3 * * * /usr/local/bin/backup.sh /opt/cvs-repos/repos-r /home/ftp/cvs inc
0 13,20,5 * * * /usr/local/bin/backup.sh /opt/cvs-repos/repos-user /home/ftp/cvs inc
# configuration of backup server
# backup data from remote server: sync data with cvs, news and nightly_build sever.
#minute hour mday month wday command
#
0 6 * * * /usr/bin/rsync -a -e "/usr/bin/ssh -l root" 10.0.0.7:/home/ftp/news /opt/bcp
0 7 * * * /usr/bin/rsync -a -e "/usr/bin/ssh -l root" 10.0.0.7:/home/ftp/cvs /opt/bcp
0 5 * * * /usr/bin/rsync -rLptgoD -e "/usr/bin/ssh -l root" 10.0.0.8:/server/bcp/ /opt/bcp/svr
# cvs and news backup
30 6 1 * * /usr/local/bin/backup.sh /opt/news/spool /home/ftp/news/spool full
30 5 * * * /usr/local/bin/backup.sh /opt/news/spool /home/ftp/news/spool inc
30 3 * * 1 /usr/local/bin/backup.sh /opt/cvs-repos/repos-r /home/ftp/cvs full
30 4 * * 1 /usr/local/bin/backup.sh /opt/cvs-repos/repos-user /home/ftp/cvs full
0 11,14,17,19,3 * * * /usr/local/bin/backup.sh /opt/cvs-repos/repos-r /home/ftp/cvs inc
0 13,20,5 * * * /usr/local/bin/backup.sh /opt/cvs-repos/repos-user /home/ftp/cvs inc
# configuration of backup server
# backup data from remote server: sync data with cvs, news and nightly_build sever.
#minute hour mday month wday command
#
0 6 * * * /usr/bin/rsync -a -e "/usr/bin/ssh -l root" 10.0.0.7:/home/ftp/news /opt/bcp
0 7 * * * /usr/bin/rsync -a -e "/usr/bin/ssh -l root" 10.0.0.7:/home/ftp/cvs /opt/bcp
0 5 * * * /usr/bin/rsync -rLptgoD -e "/usr/bin/ssh -l root" 10.0.0.8:/server/bcp/ /opt/bcp/svr