Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

How do I start a Cron job 1 min after @reboot?

I need my script to be executed a minute after each reboot. When I apply @reboot in my crontab it is too early for my script - I want the script to be executed after all other tasks that are routinely run on reboot. How might I run the script sometime after reboot?
by

1 Answer

Bharatgxwzm
Is the script only ever intended to run one minute after boot up, or can it be used at other times, too? In the former case, you can add sleep 60 to the beginning of your script, or in the latter case, add it to the crontab file:
@reboot sleep 60 && my_script.sh

As has been pointed out by sr_, though, perhaps you are tackling this in the wrong way, and a proper init.d or rc.d script would be a more robust solution.

Login / Signup to Answer the Question.