KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This keeps happening to me all the time: 1) I write a script(ruby, shell, etc). 2) run it, it works. 3) put it in crontab so it runs in a few minutes so I know it runs from there. 4) It doesnt, no error trace, back to step 2 or 3 a 1000 times. When I ruby script fails in crontab, I can't really know why it fails cause when I pipe output like this: ruby script.rb >& /path/to/output I sorta get the output of the script, but I don't get any of the errors from it and I don't get the errors coming from bash (like if ruby is not found or file isn't there) I have no idea what environmental variables are set and whether or not it's a problem. Turns out that to run a ruby script from crontab you have to export a ton of environment variables. Is there a way for me to just have crontab run a script as if I ran it myself from my terminal ? When debugging, I have to reset the timer and go back to waiting. Very time consuming. How to test things in crontab better or avoid these problems?
Tags (comma-separated)
Save Edits
Cancel