cron wakeonlan don't start

ciccio

Dabbler
Joined
Jan 15, 2019
Messages
27
hi I have created a script for woakeonlan clients from freenas

/usr /sbin/wake eth0 macaddress1 macaddress2 ...

with prompt it works, it regularly turns on the clients, but if I create a cron jobs (with root) it doesn't start anything.
some idea?

thank you
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
The cron job needs the absolute path to your script ...
 

proto

Patron
Joined
Sep 28, 2015
Messages
269
/root/wol-mag

Try exporting your paths:

Code:
#/bin/sh
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin

wake [interface] lladdr [lladdr ...]
 
Top