471,350 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Running a process every N days

What's the best way to run either an entire python process or a python
thread every N days. I'm running Python 2.4.3 on Fedora Core 5 Linux.
My code consists of a test and measurement system that runs 24/7 in a
factory setting. It collects alot of data and I'd like to remove all
data older than 30 days. My ideal solution would be something that
runs in the background but only wakes up to run every few days to
check for old data.

Thanks,

Dan McLeran

Jun 7 '07 #1
6 1250
On 2007-06-07, da********@yahoo.com <da********@yahoo.comwrote:
What's the best way to run either an entire python process or a python
thread every N days.
man cron
man 5 crontab

--
Grant Edwards grante Yow! It don't mean a
at THING if you ain't got
visi.com that SWING!!
Jun 7 '07 #2
On Jun 7, 3:27 pm, "danmcle...@yahoo.com" <danmcle...@yahoo.com>
wrote:
What's the best way to run either an entire python process or a python
thread every N days. I'm running Python 2.4.3 on Fedora Core 5 Linux.
My code consists of a test and measurement system that runs 24/7 in a
factory setting. It collects alot of data and I'd like to remove all
data older than 30 days. My ideal solution would be something that
runs in the background but only wakes up to run every few days to
check for old data.
google "cron"

-Mike

Jun 7 '07 #3
da********@yahoo.com schrieb:
What's the best way to run either an entire python process or a python
thread every N days. I'm running Python 2.4.3 on Fedora Core 5 Linux.
My code consists of a test and measurement system that runs 24/7 in a
factory setting. It collects alot of data and I'd like to remove all
data older than 30 days. My ideal solution would be something that
runs in the background but only wakes up to run every few days to
check for old data.
Use cron, the periodic task scheduler of your OS.

Diez
Jun 7 '07 #4
da********@yahoo.com wrote:
What's the best way to run either an entire python process or a python
thread every N days. I'm running Python 2.4.3 on Fedora Core 5 Linux.
My code consists of a test and measurement system that runs 24/7 in a
factory setting. It collects alot of data and I'd like to remove all
data older than 30 days. My ideal solution would be something that
runs in the background but only wakes up to run every few days to
check for old data.

Thanks,

Dan McLeran

And you can use cron to launch your python program?

--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
Jun 7 '07 #5
On 6/7/07, David Bear <da********@asu.eduwrote:
da********@yahoo.com wrote:
What's the best way to run either an entire python process or a python
thread every N days. I'm running Python 2.4.3 on Fedora Core 5 Linux.
My code consists of a test and measurement system that runs 24/7 in a
factory setting. It collects alot of data and I'd like to remove all
data older than 30 days. My ideal solution would be something that
runs in the background but only wakes up to run every few days to
check for old data.

Thanks,

Dan McLeran


And you can use cron to launch your python program?

--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
yes.
man cron
man crontab
Jun 7 '07 #6
Hi Dan

FWIW I'd use logrotate for this.

Regards
Mark Westwood

On Jun 7, 11:27 pm, "danmcle...@yahoo.com" <danmcle...@yahoo.com>
wrote:
What's the best way to run either an entire python process or a python
thread every N days. I'm running Python 2.4.3 on Fedora Core 5 Linux.
My code consists of a test and measurement system that runs 24/7 in a
factory setting. It collects alot of data and I'd like to remove all
data older than 30 days. My ideal solution would be something that
runs in the background but only wakes up to run every few days to
check for old data.

Thanks,

Dan McLeran

Jun 8 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by fwells11 | last post: by
11 posts views Thread by Richard Myers | last post: by
4 posts views Thread by ImSoLost | last post: by
4 posts views Thread by tshad | last post: by
24 posts views Thread by Mark | last post: by
5 posts views Thread by This | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.