This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description
MULTISCHED
==========

### Description

Multisched is a lightweight function scheduler module for python


### Usage

```python
from multisched import Scheduler
import time

s = Scheduler()

def timestamp(s):
print '%.2f : %s' % (time.time(), s)

class Action():
def __init__(self, name):
self.__name__ = name
self.call_counter = 0

def __call__(self):
self.call_counter += 1
print 'I am %s (%d)' % (self.__name__, self.call_counter)

# ----------------------------------.
# |
# TASK PARAMS: |
# |
# loopdelay: float, required |
# initdelay: float, default=0 |
# threads : int , default=0 |
# |
# ----------------------------------`
@s.AddTask(loopdelay=1.3)
def task1():
timestamp('task1')

@s.AddTask(loopdelay=1.0, initdelay=3)
def task2():
timestamp('task2')
time.sleep(1.6)
timestamp('task2 again')

@s.AddTask(loopdelay=1.1, threads=4)
def task3():
timestamp('task3')
time.sleep(4.4)
timestamp('task3 again')

s.AddTasks({'action' : Action('Agent%03d' % n)
,'loopdelay' : 0.6
,'initdelay' : 1.1
,'threads' : 0
} for n in xrange(42))
print s
s.StartAllTasks()
try:
raw_input()
except:
pass
s.StopAllTasks()

```
Release History

Release History

0.1.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
multisched-0.1.4.tar.gz (2.9 kB) Copy SHA256 Checksum SHA256 Source Jun 5, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting