• Hello,

    I find an old topic here but comand do not work. Please could someone update the right command?



  • What do you mean ?

    [2.3.4-RELEASE][admin@pfsense.brit-hotel-fumel.net]/root: wol
    wol: Too few arguments.
    Try `wol --help' for more information.
    [2.3.4-RELEASE][admin@pfsense.brit-hotel-fumel.net]/root: wol --help
    Usage: wol [OPTION] ... MAC-ADDRESS ...
    Wake On LAN client - wakes up magic packet compliant machines.
        --help          display this help and exit
    -V, --version       output version information and exit
    -v, --verbose       verbose output
    -w, --wait=NUM      wait NUM millisecs after sending
    -h, --host=HOST     broadcast to this IP address or hostname
    -i, --ipaddr=HOST   same as --host
    -p, --port=NUM      broadcast to this UDP port
    -f, --file=FILE     read addresses from file FILE ("-" reads from stdin)
        --passwd[=PASS] send SecureON password PASS (if no PASS is given, you
                        will be prompted for the password)
    Each MAC-ADDRESS is written as x:x:x:x:x:x, where x is a hexadecimal number
    between 0 and ff which represents one byte of the address, which is in
    network byte order (big endian).
    PASS is written as x-x-x-x-x-x, where x is a hexadecimal number between 0
    and ff which represents one byte of the password.
    Report bugs to <krennwallner@aon.at></krennwallner@aon.at>

    The command works ….
    The cron package exists also now.
    I just woke up our coffee machine.....

  • I have this.. (see pict). Normally it should wake my NAS everyday at 10.01.
    It never wake it… :(

    PS : My NAS wakes up if I do WOL manually.

  • Putting the command in a cron is the final step.

    You tested the command from the console (SSH !) interface ?
    You did set up the NAS so it wakes up on when it receives the WOL packet ?
    Try also to wake it up from a windows PC using : https://sourceforge.net/projects/aquilawol/
    And even : try to wake up a Windows PC (settings have to be made in Windows and may be even the BIOS).
    When you can WOL "by hand" only then you automise (by cron).
    Check if the cron line is executed (see logs).

  • Yes I know what mean WOL ! LOL!  ;D ;D ;D
    Years I do manually (by hand..).

    In Pfsense there is ALSO a function for WOL and "by hand" it works perfectly with my NAS.

    Thats why I am confused…

  • Any update on this old topic? I am in the same boat as OP.
    I can manually start my unraid server and test Dell laptop from the WOL menu under Services but when I try to schedule the cron job or run the command manually I do not get the WOL protocol.
    I am monitoring the network traffic from Wireshark and I can see a protocol "WOL" when I run the wake up from the Services menu. When I try to run this command from cron or manually under Diagnostics> command prompt I only see TCP protocols broadcast.
    I am trying to wake both Unraid and Dell laptop.

    here is the commands I have been trying

    /usr/local/bin/wol (Mac address) This will broadcast to entire IP scheme
    /usr/local/bin/wol -v -i 172.x.x.x (Mac address) This only targets the exact IP of the machine

    Any help would be great

  • Dono ....
    I just power down a PC next to me, and the I typed in

    /usr/local/bin/wol -v -i b8:ac:6f:47:2d:b2

    The PC woke up immediately.

    Btw : I use the console access. That the one for 'real' commands.

  • Netgate Administrator

    It's usually because the user Cron runs with is not admin/root and somethings are subtly different. Default paths, permissions etc. You are using the complete path so that rules that out. Do you see any errors logged at that time?


  • @Issom Hi,
    I know what you and OP mean. I have the same issue. It works manually but not via cron.
    I want to wake up my server at 7 am but it won' t work. So after I realized it was not working I punshed the command in the command line and I got one error. It says that the host was not reachable. But direct after that I used the WOL service of the pfsense and it worked perfectly. (I am using pfSense 2.4.4. p3)
    So was is the weird behaviour?

    Best regards

  • I've discovered a solution for this problem. Here you can find it. It' s a german post. Translated it says:
    You have to activate the "static ARP" option at the "DHCP Static Mappings for this Interface" of the DHCP Server. Now you can wake your Host up with (direct from shell or via cron):
    /usr/local/bin/wol -i IP MAC

    Best regards

  • Netgate Administrator

    Hmm, that should not be required. The machine doing the waking should not need to know anything but the MAC address.
    Does it just not send the packet if you use the MAC only?


  • @stephenw10
    Sorry, I don't know. I didn' t used the wol command without the IP option.

  • I bumped into the same problem. Sharing my findings for future visitors (tested with VLANs present - not sure if it matters).

    Interface required:

    Specifying the interface is optional, but without it the command doesn't work.

    • wol xx:xx:xx:xx:xx:xx - executes, but no magic packet to device.
    • wol -i xx:xx:xx:xx:xx:xx - works.

    Entries required in /etc/crontab:

    • Manually add job definition to /etc/crontab - works, job triggers.
    • crontab -e (as root user) - reports success, but job doesn't trigger. I also tried restarting cron after adding entries as another post suggested, but no luck.

    So, edit /etc/crontab file directly and add your entry there. For the interface address, either machine IP or broadcast IP may be specified.

    e.g.. /etc/crontab

    # Wake up server at 6:30
    30      6       *       *       *       root    wol -i c0:3f:d5:66:XX:XX
    # If possible do not add items to this file manually.

  • @pbshaan said in Cron for WOL:

    So, edit /etc/crontab file directly


    pfSense most simple package might be useful here.
    Introducing the wol package :


    Now, your own crons will even be saved in the global pfSense config, making it a real set it and forget it thing.

    Also, according to the "official manual" :


    If FreeBSD was installed on desktop type device with a single NIC, then this option is an option as there is only one NIC.
    Our pfSense tends to have at least 2 NICs. So the option is qualified as "important".
    I guess it's even a security issue if wol starts to send its notifications on all my xx interfaces.