Wakeonlan as cron job at specified time

Hello Guys.
I am trying to plan cron job to wake up a PC on a specified time.

I have created a script with the input below and saved this here: /home/osmc/Scripts/

sudo etherwake xx:xx:xx:xx:xx:xx

In crontab i have filled this:

35 16 * * * /home/osmc/Scripts/wol.sh

So, nothing is happen. The PC didn’t wake up.

When i run manually sudo etherwake xx:xx:xx:xx:xx:xx, the PC wake up!

What’s wrong?

You probably need to supply the path to etherwake in your script. You also need a shebang line as the first line of the script:


and make sure it’s executable.