Advice

Ian Kelly ian.g.kelly at gmail.com
Tue Nov 11 13:24:41 EST 2014


On Tue, Nov 11, 2014 at 9:53 AM, Mary-Frances McNamee <
MaryFrances.McNamee at epas-ltd.com> wrote:
>
> I am currently working on a bit of coding for a raspberry pi, I was
wondering maybe I could get some advice? I want my program to run for a
certain time, for example 7am-2.30am everyday. Is this possible?

You can set up a cron job to start your program every day at whatever time
you want: http://en.wikipedia.org/wiki/Cron

To shut down the program, have your program periodically check the time and
exit if the time is past the time you want to shut down. Exactly how you do
this would depend on how the program is structured.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20141111/97de0a97/attachment.html>


More information about the Python-list mailing list