Wednesday, May 31, 2006

Linux : crontab does not run perl scripts ?

Recently, I had hard time making crontab run my perl script. The problem was with the environment variable PATH. When given correct path, it started executing the scripts. Following could be the problems

  • Wrong shebang path (the first line that starts with #!). This line tells which command/program to use for execution of the script.
  • Incorrect permissions
If you want to execute a perl script, make sure the output of 'which perl' is used as the path in your shebang.

1 comment:

Anonymous said...

Hey, I remeber crontab, I used in my last project in company to download files using sftp connection from server after interval of one day.

--Shrinivas