473,395 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 1303
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mee Yamo | last post by:
Fellas!! This is a very complicated one and it took me a few days to figure out exactly what's going on, but here's the final story: I have a production environment running on .NET with a SQL...
29
by: pb648174 | last post by:
I have a very long transaction that runs on the same database that other users need to use for existing data. I don't care if they see data from the transaction before it is done and am only using...
5
by: fwells11 | last post by:
Hi there. As you will see from my questions, I am an SQL newb. I dabble but never get to spend enough time to get proficient so base any feeedback on that basis please. This is all theoretical...
11
by: Richard Myers | last post by:
Hello Im sure many of you have seen this error message before: For us its the third time this year. This error occurs seemingly at random. I have no idea what causes it too happen. None....
7
by: MgGuigg | last post by:
Hello all, This is my first time posting a question to this forum, so here is hoping I am following protocol. I am scraping the rust off my old Basic programming skills, and have just recently...
4
by: ImSoLost | last post by:
I'm running a really long process from ASP.NET and need some help... I am making a method call when the user presses a button from my webpage, which goes into a database and parses a file. This...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
24
by: Mark | last post by:
Hi, I'm new to python and looking for a better idiom to use for the manner I have been organising my python scripts. I've googled all over the place about this but found absolutely nothing. I'm...
5
by: This | last post by:
I have a pretty basic emailing script that sends a relatively small number (150) of html emails. The emails are compiled, personalised from a mysql db subscribers list, and sent using mail() -...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.