syntax for bi-weekly cron job?

Davide Ferrari davide.ferrari at atrapalo.com
Fri Dec 5 05:02:21 CST 2008


On Friday 05 December 2008 06:33:44 Tino Schwarze wrote:
> flagfile=/var/run/`basename $0`.weekly
> if [ -f "$flagfile" ] ; then
>     echo "Not running this week"
>     rm "$flagfile"
>     exit
> fi
> touch "$flagfile"
> # do work

Although I always try to do not use lockfiles, this is a smart suggestion 
indeed :)

-- 
Davide Ferrari
Atrapalo.com System Administrator



More information about the Linux-PowerEdge mailing list