1

I have a python script that completes exactly as expected when run manually as the root user. When I put the script into cron.daily it crashes 100% of the time.

The error is a timeout error, but this question is not about troubleshooting the error directly.

Executing this works:

$ /etc/cron.daily/myscript

But it crashes when run automatically via cron.

The Question: What is different about a root bash shell and the environment /etc/cron.daily executes in?

0

Cron scripts run, by default, in a very minimal environment. The exact set of variables, and their values, should be described in crontab(5) (the details vary by OS).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.