Stay at Home!! Be Safe!! Take Care!!

Thanks all my viewers for your support, I am an Oracle Ace now. For Any queries, please mail us at support@funoracleapps.com

How to schedule a cron after System Reboot in Linux

No comments

How to schedule a cron after System Reboot in Linux


Many times we require to schedule cron job after the system start, in that scenario, we can use the below option to schedule any type of cron.



[himanshu@oel7 tmp]$ crontab -l
@reboot echo "this is running after system start `date`" >/tmp/bootcron.log



If we want to run after 2 mins of reboot then we can do as below. 120 value is the number of seconds to wait for

[himanshu@oel7 tmp]$ crontab -l
@reboot sleep 120 && echo "this is running after system start `date`" >/tmp/bootcron.log




If you like please follow and comment

No comments :

Post a Comment