Skip to main content

No project description provided

Project description

Runs functions concurrently in the background,
scheduled and with timeout/retries if they get
stuck.

Home-page: https://paulopes.github.io/running/
Author: Paulo Lopes
Author-email: palopes@cisco.com
License: UNKNOWN
Description: About **runningtrack**
======================

The runningtrack package runs functions in background processes, using a schedule,
and with a timeout/retry capability.

**runningtrack** is a Python package that allows you to launch functions in
background processes, at scheduled weekdays and times, multiple times a
day if necessary, and should a function take longer than a certain
timeout to complete then the function will be terminated and launched
again.

Schedules, timeouts, retries are configurable.

Example
-------

.. code:: python

import runners


def main(*argv):
import runningtrack

groups = (
runningtrack.Group("cl1").run(
# Functions to be launched in parallel:
runners.pub,
runners.sub1a,
runners.sub1b,
# Everyday at this time:
).at("12:30"),

runningtrack.Group("cl3").run(
# Functions to be launched in parallel:
runners.pub,
runners.sub1a,
# Every Monday at these two times:
).monday("0:45 12:45"),
)

# Use the 'now' parameter to bypass the schedule
# runnning all runner groups at once and just once.
if len(argv) > 1 and argv[1].lower() == 'now':
runningtrack.now(*groups)
else:
runningtrack.info()
runningtrack.wait(*groups)


if __name__ == "__main__":
from sys import argv
main(*argv)


License
-------

Licensed under the Apache License, Version 2.0
Platform: UNKNOWN

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

runningtrack-0.4.1.tar.gz (17.6 kB view hashes)

Uploaded Source

Built Distribution

runningtrack-0.4.1-py3-none-any.whl (20.6 kB view hashes)

Uploaded Python 3

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