Skip to content

marwinxxii/apschedulerweb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APScheduler-Web

apscheduler + bottle = apschedulerweb

This is a web interface for Advanced Python Scheduler. It provides functionality for managing jobs added to scheduler, such as: - Stopping/starting jobs - Viewing logs of failed runs

Requirements

Python 2.7+, bottle, apscheduler

Usage

The only thing you need to do is pass Scheduler object and config options to start function of apschedulerweb module. :: from apschedulerweb import start from apscheduler.scheduler import Scheduler

s = Scheduler() def printer(s): print(s)

s.add_interval_job(printer, args=['hello'], seconds=5) start(s, users={'user':'pass'})

Also you can write configuration file and run directly apschedulerweb module. example.json:

{
  "web": {
    "users": {
      "user": "pass"
    },
    "user": "alex",
    "pid_file": "example.pid",
    "max_log_entries": 5,
    "max_auth_tries": 3
  },
  "bottle": {
    "host": "localhost",
    "port": 8080
  },
  "jobs": [
    {
      "file": "example.py",
      "func": "printer",
  "trigger": "interval",
      "args": ["hello"],
      "seconds": 5
    }
  ]
}

example.py:

def printer(s):
    print(s)

and then run python -m apschedulerweb --conf=example.json

About

web intrface for Advanced Python Scheduler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages