Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for Python script is not running under cron, despite working when run manually

Current License: CC BY-SA 4.0

Post Revisions

13 events
when toggle format what by license comment
Nov 17, 2019 at 18:48 comment added jww +1 for including details like PATH.
Nov 17, 2019 at 18:39 history edited jww CC BY-SA 4.0
Tweak title.
May 11, 2014 at 19:24 comment added Jonathan Leffler Seeing usr/bin/python as the error message suggests that somewhere along the line, you've lost a leading slash. Maybe you have #!usr/bin/python in a shebang? Very often, the problem with "it works on the command line but not in cron" comes down to 'environment' — see (amongst others) Perl script works but not via cron.
Jun 16, 2011 at 15:28 history edited cfrederich CC BY-SA 3.0
added 107 characters in body; edited body; deleted 107 characters in body
Jun 16, 2011 at 14:22 vote accept cfrederich
Jun 15, 2011 at 20:13 history edited cfrederich CC BY-SA 3.0
added 1544 characters in body
Jun 15, 2011 at 19:48 comment added James C make sure root's email is setup to go somewhere and have a look at any emails this is generating. If you don't have any mail forwarding enabled run the mail command as the root user.
Jun 15, 2011 at 19:44 history edited cfrederich
edited tags
Jun 15, 2011 at 19:31 comment added cfrederich i found this in the cron log, so its clearly trying to do something
Jun 15, 2011 at 19:31 comment added cfrederich Jun 15 18:02:01 domU-12-31-38-00-AC-02 CROND[5310]: (root) CMD (/home/ec2-user/cronscripts/testscript.py) Jun 15 18:03:01 domU-12-31-38-00-AC-02 CROND[5317]: (root) CMD (/home/ec2-user/cronscripts/testscript.py)
Jun 15, 2011 at 19:22 answer added amit_g timeline score: 6
Jun 15, 2011 at 19:21 comment added hvgotcodes look in the system logs to see the errors
Jun 15, 2011 at 19:16 history asked cfrederich CC BY-SA 3.0

AltStyle によって変換されたページ (->オリジナル) /