Posted: Fri Oct 05, 2007 21:18 Post subject: How to schedule radio on/off differently on weekends
Is there any way to schedule the on/off times of the WiFi radio differently on weekdays and weekends? I know the UI doesn't allow it, but maybe it can be scripted somehow?
@infusion: I've never used cron before; is it exceedingly difficult? Could you give me a nudge in the right direction? If I were to see a script which turns the radio on/off on a particular weekday, I can extrapolate the rest with a little research.
Joined: 07 Jun 2006 Posts: 980 Location: Coal Creek Canyon, Colorado
Posted: Tue Oct 09, 2007 18:13 Post subject:
this is way easy in the gui on v24
go to the admin /management tab
under cron, click "enabled"
under "additonal cron jobs" enter your jobs
to follow infusion's example
0 0 * * 6 root wl radio off
0 0 * * 1 root wl radio on
click "apply" then "reboot router"
that's IT !
(FYI what this does is store the commands in an nvram variable named cron_jobs, which gets written to /tmp/cron.d/cron_jobs at startup). _________________ linksys GSv2, Gv4, Gv2, GLv1, G-TM, Buffalo wbr2, whr, whr-hp, whr-g125, wli-tx4-g54hp, Moto wr850gp, Alix.3C2
This is to have WiFi disabled Saturday and Sunday from 3 AM to 9 AM (when I'm sure to be out of it), and on weekdays from 2 AM to 7 AM (ditto) and from 10 AM to 7 PM (when I'm at work). I suppose home office days and holidays will be a problem, but I'll try to figure something out.
Thanks, dicksons, that seems like the easiest way. However, I'm still on v23, and I don't have those options. However, I added it to the firewall script (I read that the startup script was broken in this version), and it gets added OK to crontab.
Too lazy to test now, so I'll just wait until the specified timeframe to see if it turns off.
Posted: Fri Oct 12, 2007 11:23 Post subject: Not working
Hey, guys. Based on the "cron" post on the Wiki, I added "stopservice cron && startservice cron" to the script. The script seems to be working, because the /tmp/crontab file has all my added lines. However, the radio isn't getting turned on/off ever. What am I missing? Am I using the wrong crontab file?