I'm running the following cron job: cd rails_app/lib/tasks && rake rake_task_name
and I receive the following cron notification: /bin/sh: rake: command not found
When I ssh into the server, I'm able to run rake with no problem.
Any ideas?
2008-04-06 10:28 AM
Santhi
Posts: 226
Starts: 0
Wiki Edits: 1
Could you try /usr/local/bin/rake instead of rake ?
2008-04-06 10:49 AM
Eggman
Posts: 3
Starts: 5
Wiki Edits: 0
Location: New York City
Santhi,
I tried that, and now this is what I'm getting: rake aborted! Access denied for user 'root'@'localhost' (using password: NO)
(See full trace by running task with --trace) (in /home/username/...)
2008-04-07 09:41 AM
Santhi
Posts: 226
Starts: 0
Wiki Edits: 1
Did you configure your database.yml properly?
2008-04-07 10:32 AM
Eggman
Posts: 3
Starts: 5
Wiki Edits: 0
Location: New York City
The database.yml is configured so that the rails app can access the database, yes.
The message I'm getting above, I think says that the cron job is being run as 'root' and that it doesn't have the right permissions.
Any ideas?
2008-04-09 11:19 AM
Muxyd
Posts: 16
Starts: 0
Wiki Edits: 0
I have modified your cronjob and now it seems to be working fine. Please check and confirm.
2008-04-09 08:05 PM
Eggman
Posts: 3
Starts: 5
Wiki Edits: 0
Location: New York City
I see that the rails environment had to be specified. The command is working properly now.
However, looking at the log for one of my cron jobs, I'm getting: rake aborted! execution expired
Is this because it took too long? Is there a way for me to get around this?
2008-04-10 07:49 AM
Kumar
Posts: 447
Starts: 0
Wiki Edits: 5
Hi - Please post a ticket to the support with this error messages. Also please update the path to the logs so that we can check this and get back to you. Thank you
2008-04-10 01:19 PM
HostingRails Support
Hello Guest! In order to post you must be an active client with us, please
log in
or sign up.