Skip to content

A simple Python daemon that schedules tasks to run on a regular interval for our data visualization projects.

License

Notifications You must be signed in to change notification settings

TID-Lab/analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analysis

A simple Python daemon that schedules tasks to run on a regular interval. We use this daemon in our data visualization projects to perform intermediate analysis on large datasets.

Installation

This daemon depends on the schedule package to run tasks on a regular interval. You can install it on your local machine with the command below:

pip install schedule

Usage

Running

To run the daemon, just execute:

python main.py

It is up to you how you go about configuring your system to run main.py on startup. See this StackOverflow post if you are using Ubuntu for guidance.

Adding a task

To add a task, follow the three steps below:

  1. Tasks are Python files with a single run function that gets executed when the task is executed. See tasks/example.py:

    def run():
        print("Hello, World!")
  2. Import your task to main.py:

    from tasks import example
  3. Schedule the task using the schedule package. You can find the docs here.

    # Schedules the `example` task to execute every 3 seconds.
    schedule.every(3).seconds.do(run_threaded, example)

License

This project is licensed under the MIT license by the Technologies & International Development (TID) Lab at Georgia Tech.

About

A simple Python daemon that schedules tasks to run on a regular interval for our data visualization projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages