@reboot Cron Jobs Not working

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
jebise101
DD-WRT Guru


Joined: 25 Sep 2009
Posts: 541

PostPosted: Tue Jan 26, 2016 0:16    Post subject: @reboot Cron Jobs Not working Reply with quote
I have a few cron scripts scheduled and they work perfectly, however I'm trying update one of the jobs to start when the router reboots. Ideally I would like the script to execute 60 seconds after the router has finished rebooting.

I've tried the below options but they do not work:

@reboot root script
@reboot sleep 60 root script
@reboot sleep 60; root script
@reboot /bin/sleep 60 script

Currently the below works perfectly.

0 5 1 * * root script
Sponsor
HalfBit
DD-WRT Guru


Joined: 04 Sep 2009
Posts: 506
Location: AR, USA

PostPosted: Tue Jan 26, 2016 2:52    Post subject: Reply with quote
Two questions:
    1. Why not build the sleep 60 into your script instead of the cronjob?
    2. Why not put the script in the startup section on the Administration/Commands tabs on the GUI instead of the cronjobs?

_________________
R7000 Nighthawk - DD-WRT v3.0-r28600M kongac (12/31/15)
~~~~~~~~~~~~~~Not Currently Used~~~~~~~~~~~~~~
WRT54Gv2 - V24 STD Build 22118 configured as AP
WRT54Gv8.2 - V24 Micro Build 22118 configured as AP
jebise101
DD-WRT Guru


Joined: 25 Sep 2009
Posts: 541

PostPosted: Tue Jan 26, 2016 13:05    Post subject: Reply with quote
You know what? That is a great idea and this is exactly what i'll do.

Don't know why i didn't just think of that
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum