Tag Info

New answers tagged


To run the script like it's running on your own account (with bash) change your crontab to the following: */15 * * * * sudo -u ashish /home/ashish/parser.sh This will run the script almost as if you executed it from the command line on your own account.


*/15 * * * * . /home/ashish/parser.sh cron uses sh, not bash, so when you source the script (that's what the . does), it is run under sh, not bash. Remove the .. Also, the PATH for cron is limited. Specify the full paths to commands you use, such as workon, or set PATH yourself.

Top 50 recent answers are included