Quote:
Originally Posted by Wotan31
I don't like loops. Why not have a cron job that runs every hour, checking for the presence of this file?
|
And if the cron die ?
1. add a cron job to check if the script is running, if not start the script.
2. The script should be something like:
Code:
#!/bin/sh
# Loop forever
while :
do
# Check if cron is running
test $(ps ax | grep -c "[c]ron") -gt 0 || /etc/init.d/crond start
#Do whatever you have to do
echo "Hello world"
# Sleep one hour
sleep 360
done # Start over