cron.sh 308 Bytes
#!/bin/sh

cd /home/redmine-sched/redmine-scheduler > /dev/null
for file in cron-*.php; do
	(
		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

exit 0