redmine

Added locks to cron.sh

Showing 1 changed file with 6 additions and 1 deletions
... ... @@ -2,7 +2,12 @@
cd /home/redmine-sched/redmine-scheduler > /dev/null
for file in cron-*.php; do
php ./"$file" &
(
lockfile-check /run/redmine-schred-"$file".lock && exit 0
lockfile-create /run/redmine-schred-"$file".lock
php ./"$file"
lockfile-remove /run/redmine-schred-"$file".lock
) &
done
cd - > /dev/null
... ...