0
votes
1answer
196 views

Setting Up a Python Cron Job

I hope you guys can help. I've never set up a cron job before but would like to run a daily Python script at 5am on my server. I'm using hosting from CrazyDomains.com.au (Linux server) and can't find ...
0
votes
2answers
197 views

Automate python script mac

I want to set up a python script to run every weekday(not sunday and saturday) on my mac OSX 10.8.4. From what I have found so far, it looks like I want to use cron. But before I do something horrible ...
1
vote
2answers
271 views

os.popen returns empty string when called from cron

I'm trying to get my Raspberry Pi's CPU usage like so: def get_cpu_usage(): return os.popen("top -n1 | awk '/Cpu\(s\):/ {print $2}'").readline().strip() When executed normally, this method ...
0
votes
1answer
2k views

Python script not running as cronjob

I have tried everything and I've seen other questions here regarding this but I cannot for the life of me run a python script as a cronjob. I've tried the following. * * * * * /usr/bin/python ...
1
vote
1answer
82 views

python, cron and the interaction with Growl

I have the following python file called temp.py import subprocess p = subprocess.Popen('growlnotify -m \"Program is not running\"', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) ...
1
vote
2answers
2k views

Multiple crontabs for one user

is there a way to use multiple crontab files for one user? Thinking something along the lines of crontab file per project instead of crontab per user... Any help is appreciated...
1
vote
1answer
862 views

why does my python cron job time out?

I have a long cron job running a python script in CENTOS, but for some reason it seems to timeout or otherwise end without completion. the job runs fine when executed straight from bash, but seems to ...
2
votes
2answers
967 views

kill and restart process by cron

I've got python script running on a remote machine, periodically it stops responding so I ssh in, kill the existing process, and then restart it. I have to do this several times a week and it's ...
4
votes
2answers
2k views

cron can't read PYTHONPATH environment variables?

I have added to the PYTHONPATH on my server's .bash_profile file. However it appears that cron isn't reading from it because I am getting import errors. If I run the exact command cron calls on the ...