Need to run a little script hourly, exact instructions for a fool please!
Need to run a little script hourly, exact instructions for a fool please!
~/scheduled-scripts/hourly.py
for now (i.e. a script called hourly.py
in a directory scheduled-scripts
in your home directory).scheduled-scripts/hourly.py
.Note: As far as I know there's no way to edit a scheduled job once you've added it. In other words change the times it runs - you can edit the script itself any time you like and the scheduled job will always execute the current version of the script file. If you need to change the times at which it runs, simply delete it (with the remove link) and re-add it in the same way.
Does that help?
Thanks Cartroo, I think it now works, I got a return code of 2, is that good?
Any return code that's not zero is normally a sign that something went wrong in the script -- that is, PythonAnywhere ran your script happily, but the script itself reported an error. Is the script something you wrote yourself? Or something someone gave you?
I will run it a few times as one completed fine with a 0 returned, yet the other identical script ran at another time and returned 2.
No panic as I will play about with it but appreciate the feedback. Thanks.
No problem! Just let us know if you have any further questions.