Skip to main content

Simple Scheduler for Python 3.X

Project description


Simple scheduler module


Only tested on Python 3.X

From source:

$ python install

For production:

$ pip install job-scheduler


from datetime import datetime
from datetime import timedelta
from haydn.scheduler import S
from haydn.event_emitter import EventEmitter
import logging


class Example(EventEmitter):

    def __init__(self):
        self.schedule_manager = Scheduler(timer_interval=1)

    def main(self):
        schedule_time = ScheduleTime(start_datetime=datetime.utcnow() + timedelta(seconds=2), end_datetime=datetime.utcnow() + timedelta(seconds=100), repeat=ScheduleTime.REPEAT_SECOND, repeat_interval=5, repeat_limit=5)
        schedule = Schedule(schedule_time, self.do_something, task_params=[1], reference_id=1)


    def do_something(self, p1):
        print("doing task")
        print("task parameter: ", p1)

example = Example()

Project details

Download files

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

Source Distribution

job-scheduler-0.3.4.tar.gz (3.6 kB view hashes)

Uploaded source

Built Distribution

job_scheduler-0.3.4-py3.7.egg (8.0 kB view hashes)

Uploaded 3 7

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page