Re: How to schedule for every two fridays with cron and/or at?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--On Friday, July 16, 2004 7:29 PM -0400 Sam Varshavchik <mrsam@xxxxxxxxxxxxxxx> 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.




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux