Skip to content

Eldhrimner/pyramid_task_scheduler

Repository files navigation

pyramid_task_scheduler

Build Status pre-commit Code style: black

Install

install packages pip install pyramid-task-scheduler

or require in setup.py

add the follwing line to your Configuratior section of your pyramid application: e.g

    config = Configurator(settings=settings)
    config.include('pyramid_task_scheduler')  # Add this Line

Modes

json crontab

add the following two lines to your .ini file

pyramid_task_scheduler_mode = json
pyramid_task_scheduler_path = path_to/crontab.json

single cron crontab example:

{
	"cron": [
		{
			"name": "first_cron",
			"import_script": "import_script",
			"exec_func": "function_to_execute",
			"crontab_time": "0 * * * *"
		}
	]
}

multiple crons crontab example:

{
    "cron": [
        {
            "name": "first_cron",
            "import_script": "import_script",
            "exec_func": "function_to_execute",
            "crontab_time": "0 * * * *"
        },
        {
            "name": "second_cron",
            "import_script": "import_script",
            "exec_func": "function_to_execute",
            "crontab_time": "0 * * * *"
        }
    ]   
}

NOTE

this package is alpha experimental. It is recommened to NOT use it for productional environments.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages