I've got a number of PHP scripts running just fine in my cron job file using curl and the URL. Now I'd like to run a ruby script twice a month as a cron job, but it's not working. Here's what the command looks like in the crontab -l 08 03 01,16 * * ruby /home/myusername/webapps/mydirectory/mysubdirectory/name_of_script.rb The script is supposed to write some information to a file in the same directory. When I run the command manually ruby /home/myusername/webapps/mydirectory/mysubdirectory/name_of_script.rb it works fine. Thanks for any suggestions. asked 16 Nov '12, 10:25 phpdiva |
First, try using the full path to ruby in your cron job, eg If that doesn't work, then try adding some output redirection to your cron job, like this:
Then you can check Hope that helps! answered 16 Nov '12, 17:32 seanf Thanks. Tried that, tried adding PATH and GEM_HOME variables to my crontab, tried running the Ruby script from a shell script ... nothing works from the crontab and I'm not even getting anything in a ~/logs/user/cron.log file. Stumped.
(19 Nov '12, 14:57)
phpdiva
Submit a support ticket so we can take a closer look at the script and server logs.
(19 Nov '12, 17:20)
johns
|