Posted: Fri May 01, 2009 22:33 Post subject: CRON + WOL => Only solution that works to me !!!
I recently had to spend a couple of hours trying to figure out how to schedule a cron job
to wake my PC up at some specified days and hours along the week.
After trying EVERY SINGLE HINT/TIP/SUGGESTION in this forum and the Wiki, and searched
(with no luck) for a syntax description of the involved commands (wol and cron) I ended up
with the very known (but not less painfull) "try and error" approach.
Finally, I discovered the ONLY WORKING COMBINATION (at least for me) for a cron job in the GUI
Web section, as follows:
This set of commands in my case, are waking my PC up at 11PM on Mondays and Wednesdays (to download my favorite TV series )
Just guessing, I´d say that the general format should be:
mm hh dd MM wd root /usr/sbin/wol -p <port> -i <IP Address> <MAC Address>
- mm: Minutes (0-59)
- hh: Hour (0-23)
- dd: Day of month (1-31)
- MM: Month (1-12)
- wd: Weekday (0: Sunday, 1: Monday and so on)
You can use an star "*" on any field to schedule repetitive jobs.
- If you forget the -p ==> It doesn´t work
- If you forget the -i ==> It doesn´t work
- If you forget the "root" part ==> It doesn´t work
- If you forget the "/usr/sbin/" ==> It doesn´t work
I tried also other WORKING options:
- You can change -i by -h (I don`t know what it means, couldn´t find any documentation)
- You can invert the order for IP and the MAC addresses (???)
- You can place the "-p 7" anywhere in the command line
This syntax IS WORKING and tested used a WOL Debugging Monitor (look for it at depicus.com) with a WRT54GL router running DD-WRT V24-PreSP2 Std-nokaid Build 11296.
If anyone has better ideas or explanations are welcome !! Please share !!