Perl script not running via cron
Hi All,
I have perl script which I am trying to run on 1st Monday via cron job. So I scheduled it as follows: 0 0 1-7 * * root ["$(date '+%a')" = "Mon"] && /usr/bin/perl script.pl But then it didn't run so checked cron log and it seemed like its missing the command. so added a \ in front of %a and then it picked up the whole command as per cron log. But still it didnt ran the script. I then change the script to just && echo "test">/tmp/test Still nothing. if I run it as /usr/bin/perl script.pl it runs though Thanks in advance. |
my bad .. resolved ..
this worked.. * * * * * root [ "$(date '+\%a')" == "Fri" ] && echo "test">/tmp/test |
Quote:
Quote:
|
All times are GMT -5. The time now is 07:17 AM. |