Can't cron


#1

I’m pretty new to cron and everything that it entails. I can’t get a cron job to work with a Moveable Type script.

I have :

*/10 * * * * usr/bin/perl /home/username/path/to/script.pl

I’m assuming that username is the host, i.e. blah.dreamhosters.com (for now, until I get the domain remapped)

I can run the script just by entering in the command line:
usr/bin/perl username/path/to/script.pl

Can someone tell me what I’m doing wrong?
Thanks,
Rod


#2

You need to put it in ` (that’s backwards quotation, not quotes. Next to 1 key).

*/10 * * * * usr/bin/perl /home/username/path/to/script.pl

Doesn’t just
perl /home/username/path/to/script.pl
work as well?

I’ve had some problems running cron jobs too. They don’t seem to like my inputting command lines into them (like using the above). I’ve had to put it in a shell file .sh and then execute the shell file… very weird.


#3

You actually don’t need to put it in backticks (`) like that. I think it will still work, but it doesn’t make it run better or anything.

If you want to run a perl script like that you probably want to be using ‘/usr/bin/perl’ rather than ‘user/bin/perl’. The beginning / is vital. Also note that you can probably just do ‘perl /home/username/path/to/script.pl’ and really you can probably just do ‘/home/username/path/to/script.pl’. Just make sure script.pl is set to be executable and you don’t need to put the ‘perl’ command at the beginning at all.

  • Dallas
  • DreamHost Head Honcho/Founder