Crontab question

Nathan Kinkade nkinkade at ub.edu.bz
Thu Feb 12 14:57:14 PST 2004


On Thu, Feb 12, 2004 at 04:06:56PM -0600, Darryl Hoar wrote:
> Greetings,
> I am running 5.1-release.
> I have installed rsync from ports, and want to use it to archive.
> I want to add an entry to cron so it runs nightly.  I didn't quite
> understand the man page when it came to arguments to the 
> command you are running.
> 
> ie
> 0 0 1 * * *  /usr/local/bin/rsync -av /working/ /backup/working 
> 
> I also want the output of the rsync command to go to a named file.
> 
> Any help greatly appreciated.
> 
> -Darryl

Without consideration to the syntax of rsync, a line much like the one
you have should work.  For example:

0 1 * * *  /usr/local/bin/rsync -av /dir /backup/dir 2>&1 /root/rsync.log

This should run the specified command at 1AM every day of every week.

Nathan
-- 
gpg --keyserver pgp.mit.edu --recv-keys D8527E49
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040212/d73b3b89/attachment.bin


More information about the freebsd-questions mailing list