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.

Files for greentasks, version 2.0.post1
Filename, size File type Python version Upload date Hashes
Filename, size greentasks-2.0.post1.tar.gz (11.1 kB) File type Source Python version None Upload date Hashes View
Filename, size greentasks-2.0.post1.zip (18.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page