Running a python code periodically

D'Arcy J.M. Cain darcy at druid.net
Thu May 8 16:14:37 EDT 2008


On Thu, 8 May 2008 11:02:14 -0500
"Maryam Saeedi" <ma.saeedi at gmail.com> wrote:
> I was wondering if you know how can I run a python code once every five
> minutes for a period of time either using python or some other program like
> a bash script.

Use cron.

> I have asked this question before and some of you answered me but I still
> have problem. Most of the answers was to use cron and crontab which works on
> my computer but not if I want to do it on department's computer since I do
> not have permission to change those files. Is there any other way which does
> not need administrator permission?

Same answer.  Download the source for cron from somewhere (NetBSD,
FreeBSD, Linux, whatever), compile it and run it yourself.  You can't
run setuid but if you want something that acts like cron, cron fits the
bill.  Ain't open source wonderful?  :-)

-- 
D'Arcy J.M. Cain <darcy at druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list