Kurian Thayil wrote:
Hi All,
�
I have 3 cron jobs enabled and all are relating to RSYNC. Now, all of these scripts are run once in every 7 minutes all day. The problem occurs when the scripts doesn't finish to execute in 7 minutes. This will result in starting execution of the same script again and this will malfunction the setup.

Is there an option in CRON, which always check if CRON has started the process and is already running? Cron should execute the script only if the the process isn't running already. Any hints on this?
You could create a lockfile
  touch /var/lock/cronfiletest
and the test if this lockfile exists, or else exit
  test -f /var/lock/cronfiletest || exit 0
You'll find similar tricks in many cron and init scripts.

Sjoerd

PS. Kurian, my apologies for the message sent to you. Hit the 'reply' vs. 'reply to list' button accidentally.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to