473,398 Members | 2,427 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,398 software developers and data experts.

Periodic tasks.

Hi,

I am trying to execute some tasks periodically, those familiar with
unix can think of it as equivalent to cron jobs. I have tried looking
around, but couldn't find a way. Would appreciate any pointers or
clues..

Thanks,
-Ram

May 29 '07 #1
7 1980
Ramashish Baranwal <ra*************@gmail.comwrites:
I am trying to execute some tasks periodically, those familiar with
unix can think of it as equivalent to cron jobs.
Can you not use cron? If not, why not? Is there an equivalent service
you can use?
I have tried looking around, but couldn't find a way.
Using the services provided by the operating system would be far
preferable to re-inventing a scheduler service.

--
\ Contentsofsignaturemaysettleduringshipping. |
`\ |
_o__) |
Ben Finney

May 29 '07 #2
I am trying to execute some tasks periodically, those familiar with
unix can think of it as equivalent to cron jobs.

Can you not use cron? If not, why not? Is there an equivalent service
you can use?
I can, but the work I want to do is written in Python. This is not an
issue but I would have more than one such tasks running at different
periods and it will be desirable to control or monitor all of them
from a single process. If I use cron, all of them will execute
independently.
>
I have tried looking around, but couldn't find a way.

Using the services provided by the operating system would be far
preferable to re-inventing a scheduler service.
Agreed, but my requirement is a little different. There is a TaskKit
package (http://webware.sourceforge.net/Webwa.../TaskKit/Docs/
QuickStart.html) that has such a scheduler. Does anyone have any
experience with it?

Ram

May 29 '07 #3
Ben Finney wrote:
Ramashish Baranwal <ra*************@gmail.comwrites:
>I am trying to execute some tasks periodically, those familiar with
unix can think of it as equivalent to cron jobs.

Can you not use cron? If not, why not? Is there an equivalent service
you can use?
>I have tried looking around, but couldn't find a way.

Using the services provided by the operating system would be far
preferable to re-inventing a scheduler service.
Alternatively, the user could make use of the already-existing "sched"
module from the standard library. With a little threading that would do
the job fine.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------

May 29 '07 #4
On May 29, 4:39 pm, Steve Holden <s...@holdenweb.comwrote:
Alternatively, the user could make use of the already-existing "sched"
module from the standard library. With a little threading that would do
the job fine.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Yes. Also, there's an example in the Python Cookbook (print edition)
which is exactly about this - using sched. The recipe before that also
shows how to do it without using the sched library. Both those recipes
are purely in Python.

Vasudev Ram
Dancing Bison Enterprises
www.dancingbison.com
May 29 '07 #5
Ramashish Baranwal wrote:
Hi,

I am trying to execute some tasks periodically, those familiar with
unix can think of it as equivalent to cron jobs. I have tried looking
around, but couldn't find a way. Would appreciate any pointers or
clues..

Thanks,
-Ram

Have a look at Kronos, a simple task scheduler I wrote a while ago,
based on sched. It's part of Turbogears as well:
http://trac.turbogears.org/browser/t...s/scheduler.py
--Irmen
May 30 '07 #6
Steve Howell wrote:
>Thanks. Here are two links, not sure those are
exactly what are being referenced here, but look in
the ballpark:
http://aspn.activestate.com/ASPN/Coo.../Recipe/413137
http://docs.python.org/lib/module-sched.html
You're welcome.

The ActiveState recipe you mention above is not the one I meant,
although it uses sched.
I saw the recipe that I mentioned, in the print version of the Python
Cookbook, when reading it a few days ago.

The second link above you mention is right, its about the sched
library.

Also just found these other recipes in the online Python Cookbook, may
or may not be of help to you:

http://aspn.activestate.com/ASPN/Coo.../Recipe/496800
http://aspn.activestate.com/ASPN/Coo.../Recipe/114644
Vasudev Ram
www.dancingbison.com
May 30 '07 #7
On May 29, 2:33 pm, Ramashish Baranwal <ramashish.li...@gmail.com>
wrote:
Hi,

I am trying to execute some tasks periodically, those familiar with
unix can think of it as equivalent to cron jobs. I have tried looking
around, but couldn't find a way. Would appreciate any pointers or
clues..

Thanks,
-Ram
I googled "twisted cron", if u use twisted, that's maybe help u:
http://svn.zope.org/Zope3/trunk/src/...8967&view=auto
http://twistedmatrix.com/pipermail/t...ne/013525.html

May 30 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hans Forbrich | last post by:
The following is a Request for Discussion, following up on some recent posts about distributing a periodic news group 'Charter and FAQ' post. While not formally following RFC/RFD rules, the intent...
0
by: Hans Forbrich | last post by:
Section 1. Ballot: ------------------- 1.YES NO: I agree that there should be a periodic post describing the newsgroup charter and providing a FAQ on newsgroup usage. 2.MONTHLY BI-WEEKLY...
0
by: Hans Forbrich | last post by:
Section 1. Ballot: ------------------- 1.YES NO: I agree that there should be a periodic post describing the newsgroup charter and providing a FAQ on newsgroup usage. 2.MONTHLY BI-WEEKLY...
20
by: Karl Smith | last post by:
I heard a rumour that Opera succeeded where none have before, and implemented the tables described in HTML4 and CSS2. So I thought I'd try it out with the well known Periodic Table. ...
8
by: Stephen Rice | last post by:
Hi, I have a periodic problem which I am having a real time trying to sort. Background: An MDI VB app with a DB on SQL 2000. I have wrapped all the DB access into an object which spawns a...
5
by: nishantxl | last post by:
Hi there, I am looking to design a project using C++ The main objective of the project is to display details of periodic table elements such as periodic element name, properties(such as atomic...
7
by: KailashDas | last post by:
Please can some 1 help me out in writing a program for outputting the periodic table of elements Kailash Das
5
oranoos3000
by: oranoos3000 | last post by:
hi I want to repeat executing a seri of the code in page in interval periodic time without use from infinite loop and i prefer that page is not refreshed only a seri of the code is execute....
3
oranoos3000
by: oranoos3000 | last post by:
hi i want to get time of server with ajax,php,javascript i use under scritp and with method onload i get time on server and show on the page so i want in a period time the same function is run...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.