Cron Question
Albert Shih
Albert.Shih at obspm.fr
Tue Sep 2 16:03:54 UTC 2008
Le 02/09/2008 à 08:45:52-0700, ElihuJ a écrit
>
> Hi all. I have a question about cron jobs that seem to be running to long or
> with multiple copies of itself. For example, I have a backup script that I
> run that seems to make multiple copies of itself. If I view the running
> processes I see numerous instances of the same cron job. Is there something
> I can do to limit this from happening? When it does, it drains my CPU and
> some of my other processes are non responsive. Any help would be
> appreciated. Thank you.
That's not the to cron to do that. You must put in your script some flags.
For example if you using
rsnapshot (in the ports)
he put a lock file in /var/run (or what's ever you want) and don't start if
the script find this file. When the script is end the file is erase.
Something like
if_the_lock_file_exit :
exit 1
else
touch lock_file
my_script
rm lock_file
fi.
Regards
--
Albert SHIH
SIO batiment 15
Observatoire de Paris Meudon
5 Place Jules Janssen
92195 Meudon Cedex
Heure local/Local time:
Mar 2 sep 2008 18:01:25 CEST
More information about the freebsd-questions
mailing list