Hello - I created the cronjob for my Netgear R7000 in an attempt to get it to run the script wol_nas on the first Monday of each month at 7:50pm:
cru a Mon_NAS_on "50 19 1-7 * * [ "$(date '+\%a')" == "Mon"] && /jffs/scripts/wol_nas.sh"
Unfortunately this doesn't work. Also when I execute "cru l" in the router the output is "50 19 1-7 * * [ \Fri == Mon] && /jffs/scripts/wol_nas.sh #Mon_NAS_on#" (note this was run on a Sunday ). What am I missing in my syntax? The wol_nas script should run when the day of the month is between 1-7 and when (date + \%a) = "Mon"? Thanks
cru a Mon_NAS_on "50 19 1-7 * * [ "$(date '+\%a')" == "Mon"] && /jffs/scripts/wol_nas.sh"
Unfortunately this doesn't work. Also when I execute "cru l" in the router the output is "50 19 1-7 * * [ \Fri == Mon] && /jffs/scripts/wol_nas.sh #Mon_NAS_on#" (note this was run on a Sunday ). What am I missing in my syntax? The wol_nas script should run when the day of the month is between 1-7 and when (date + \%a) = "Mon"? Thanks