Running a Python script from crontab

Jon Redgrave jredgrave at
Tue Dec 2 23:12:33 CET 2008

On Dec 2, 2:35 pm, Astley Le Jasper <Astley.lejas... at> wrote:

Try using the "screen" utility - change the line in your crontab:
cd /home/myusername/src && python
cd /home/myusername/src && screen -dmS mypthon python -i

then once cron has started your program attach to the console using
>> screen -r mypython

(using python -i leaves you at the python prompt if the script just

I email myself and drop into the pdb debugger on an exception, then
use screen to debug the system

More information about the Python-list mailing list