My Tech Notes
Search This Blog
Ubuntu: script works in terminal fails in cron
Solution:
initialize the environment variables by sourcing
/etc/bash.bashrc
before executing your script.
0 0 * * * source /etc/bash.bashrc; /path/to/yourscript.sh
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment