Skip to main content

A simple task scheduler, built on top of gevent.

Project description

A very simplistic task scheduler built around gevent.

Usage

  1. Create a task scheduler instance:

    from greentasks import TaskScheduler
    
    scheduler = TaskScheduler()
  2. Implement a task:

    from greentasks import Task
    
    class AwesomeTask(Task):
        name = 'awesome'
        delay = 10
        periodic = True
    
        def run(self, arg1, kw=None):
            return arg1
  3. Schedule the task for asynchronous execution:

    packaged_task = scheduler.schedule(AwesomeTask)
  4. Wait for the result (if needed):

    result = packaged_task.result.get()

Project details


Download files

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

Source Distributions

greentasks-2.0.post2.zip (18.3 kB view hashes)

Uploaded Source

greentasks-2.0.post2.tar.gz (11.5 kB view hashes)

Uploaded Source

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