-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Frank Murphy Sent: Sunday, 22 June 2008 9:38 PM To: CentOS User-List Subject: [CentOS] Rsync + crontab centos5.1
Just looking at the "man rsync".
Might as well be duagnosing a plattypus.
I have made a dir on my Cent samba shares to setup a local fedora.repo
(1) How do I get it to run weekly at a certain time. is this correct?
crontab -e 22 7 0 0 /usr/bin/rsync -va
This is what I added to the top of my /etc/crontab file to remind me what goes where: SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/root/bin MAILTO=root HOME=/
# * * * * * 'command to be executed - preceed with a usersname (such as root) # | | | | | to run command as that user' # | | | | | # | | | | +----- day of week (0 - 6) (0 = Sunday) # | | | +------- month (1 - 12) # | | +--------- day of month (1 - 31) # | +----------- hour (0 - 23) # +------------- min (0 - 59)
# an asterix (*) in any field matches all values. # To create a periodic event, use */n where n is the required period. # For instance, to run a command every 5 minutes, do the following # */5 * * * * 'command to be executed'
Hope it helps clean the issue of setting up a cron job. As for rsync, maybe I'll know better when I'm done setting up a cluster system which I'm in the middle of.
Cheers, AK.