Max
Max

Reputation: 319

crontab every minute, but after script at boot up

I have a question regarding crontab. I have a script which I start after boot. The script needs sometimes more or less time. The problem is I want to use a script every minute but only if the script at the boot was successful. Because sometimes it isn't and than it auto reboots the raspberry and it tries it again. The problem is that the script at boot is necessary for the crontab script. Is there a better way than putting a sleep in the crontab file or the script?

Many thanks

Cheers Max

Upvotes: 0

Views: 427

Answers (1)

Barmar
Barmar

Reputation: 782105

Have the boot script create a file. The cron job should look for the file, and exit if it doesn't exist.

Upvotes: 1

Related Questions