How to schedule for every two fridays with cron and/or at?
Kenneth Porter
shiva at sewingwitch.com
Fri Jul 16 23:36:01 UTC 2004
--On Friday, July 16, 2004 7:29 PM -0400 Sam Varshavchik
<mrsam at courier-mta.com> wrote:
> Run the following script every Friday:
>
> if test -f /etc/foo
> then
> rm -f /etc/foo
> else
> touch /etc/foo
> exit 0
> fi
I use this in my weekly backup to alternate which remote directory to save
to:
# alternate between dump directories each week
# argument evaluates to 0 or 1
/usr/local/sbin/backup-smb $((`/bin/date +%-U` % 2))
The 0 or 1 is used as part of the directory name in my backup-smb script.
More information about the users
mailing list