10
votes
7answers
5k views

How to restart the Python script automatically if it is killed or dies

I am running my Python script in the background in my Ubuntu machine (12.04) like this - nohup python testing.py > test.out & Now, it might be possible that at some stage my above Python ...
0
votes
2answers
2k views

What is wrong with my cron job?

I'm new to linux, and was told I could use a feature called cron job to run a python script I made execute every 10 minutes. Problem is the the python script isn't running. There doesn't seem to be a ...
2
votes
2answers
4k views

Run a sudo (or startup) python script from cron on a Raspberry Pi?

I'm helping out with an art project (http://stargateeggbeater.com/ for those interested) built on Raspberry Pi. The RPi controls an addressable LED strip through the GPIO, using the spidev device per ...
2
votes
3answers
492 views

How can I schedule a python program to run from another python program?

I'm running a Python program on my Linux server, and depending on some external data it has to run again at xx minutes or hours from now. So let's say it runs at 6 AM, and then it has to run again at ...
1
vote
2answers
1k views

Python script to shutdown system doesn't work in cron

A python script to shutdown system works fine from the terminal but doesn't work when included in crontab. The script is called by cron but ends with an error 'shutdown command not found'or 'init 0 ...
0
votes
2answers
1k views

Running Python script via cron with sudo?

Im using Linux Mint. I have written a python script that is designed to not be accessible to the logged in standard user but is still be executed while they are logged in. It is to run and log them ...
3
votes
1answer
733 views

How to use cron + python to regularly adjust screen brightness?

I want to use cron and this script (http://askubuntu.com/questions/23593/use-webcam-to-sense-lighting-condition-and-adjust-screen-brightness): import opencv import opencv.highgui import time import ...
1
vote
2answers
785 views

using cron to run script

Hey guys, im trying to run a script using cron, im using a crontab created by the user ashtanga, in the crontab i have */5 * * * * /home/custom-django-projects/SiteMonitor/sender.py in top of the ...