Monday, 15 June 2015

Crontab - Python -


I'm starting in Python and Linux. While trying to schedule a Python script on the cronat file, I have some problems. Even like simple commands:

30 16 * * * root python - version> / var / log /test.txt

Not working: The file "test.txt" is actually created but it is completely empty.

Can you please help me identify the causes of such a problem?

I may be getting things here, but you can see the root Why are you putting it? Try Juts

  30 16 * * * Python - version & gt; /var/log/test.txt 2 & gt; & Amp; 1  

I just skipped the root part (it seems unnecessary) and 2> & Amp; 1 prints any errors in test.txt . In this way you can see what's going on with your program


No comments:

Post a Comment