What's new

Schedule LED Control Script not working

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

ivan0590

New Around Here
Hello. I have the Asus RT-AC68U router with the last Merlin firmware installed (384.4_2). I'm completely new to asus routers and I'm still adapting to it. But so far I'm not having mayor problems except for the following.

I was trying to schedule the led control following the guide (https://github.com/RMerl/asuswrt-merlin/wiki/Scheduled-LED-control) but somehow it doesn't work.

I created both lightsoff.sh and lightson.sh scripts and gave them permissions. I executed them manually and they worked perfectly.
I created the services-start script and gave it permissions. This is his content:

Code:
#!/bin/sh
cru a lightsoff "0 0 * * * /jffs/scripts/ledsoff.sh"
cru a lightson1 "0 8 * * 0-4 /jffs/scripts/ledson.sh"
cru a lightson2 "30 12 * * 5,6 /jffs/scripts/ledson.sh"

After that, I rebooted the router and tried to list the cron jobs using the cru l command but the list was empty, so the services-start script didn't work.

What I'm doing wrong?
 
Hello. I have the Asus RT-AC68U router with the last Merlin firmware installed (384.4_2). I'm completely new to asus routers and I'm still adapting to it. But so far I'm not having mayor problems except for the following.

I was trying to schedule the led control following the guide (https://github.com/RMerl/asuswrt-merlin/wiki/Scheduled-LED-control) but somehow it doesn't work.

I created both lightsoff.sh and lightson.sh scripts and gave them permissions. I executed them manually and they worked perfectly.
I created the services-start script and gave it permissions. This is his content:

Code:
#!/bin/sh
cru a lightsoff "0 0 * * * /jffs/scripts/ledsoff.sh"
cru a lightson1 "0 8 * * 0-4 /jffs/scripts/ledson.sh"
cru a lightson2 "30 12 * * 5,6 /jffs/scripts/ledson.sh"

After that, I rebooted the router and tried to list the cron jobs using the cru l command but the list was empty, so the services-start script didn't work.

What I'm doing wrong?
Run "dos2unix /jffs/scripts/*" should work. (Without the quotes)
 
After that, I rebooted the router and tried to list the cron jobs using the cru l command but the list was empty, so the services-start script didn't work.

What I'm doing wrong?
Did you turn on script execution (I think it's on the Administration>System page)?
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top