0

cron should work only on reboot

How to setup the cron but it should work only if i reboot my machine.

I have a script to run once my system is started i.e. rebooted.

Linux cron Add a comment
brayden
asked May 13 2017

Answer

0

For that just give @reboot in crontab instead of * * * * * as follows.

 # crontab -e
 @reboot  /bin/sh /home/user1/test.sh
Add a comment
jagannatharumugam
asked May 14 2017
edited Oct 05 2018
Post your Answer