Hi, I don't know much about OS X, but some OS have additional security restrictions. E.g., your UID might need to be listed in /etc/cron.allow and not in /etc/cron.deny (ALL matches every user) to be eligible to execute cronjobs.
Usually cronjobs are executed under plain /bin/sh, so you might explicitly want to change that. Furthermore, I would not trust tilde expansion. It might work, but using $HOME/path/to/script.pl or even manually expanding ~/ might help here. Most cron systems allow to set SHELL and HOME in the cronjob file.
Perl should be in your $PATH, but expanding that to /usr/bin/perl - or wherever perl is installed on your system is more reliable and secure. If your script.pl accesses some non-standard environment variables (i.e., via %ENV) you might need to explicitly start your standard shell (see: /etc/passwd) or use a wrapper.
So, you might end up with:
23 13 * * * /usr/bin/perl -w /home/prince9/path/to/script.pl
where /home/prince9 is the output of echo ~ and /usr/bin/perl
is hopefully the output of type perl ...
have a look at e.g. /var/log/messages too...
In reply to Re^3: Running a perl script automatically on Mac OS X 10.5
by Perlbotics
in thread Running a perl script automatically on Mac OS X 10.5
by Ninth Prince
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |