Skip to content

lmrlyv/task_scheduler

Repository files navigation

Task Scheduler

Task Scheduler is a lightweight service designed to manage and execute scheduled tasks that trigger webhooks to specified URLs. It enables users to set up tasks that call designated web URLs at predefined times, making it ideal for automating time-sensitive or recurring operations.

Technologies Used

  • Django: Backend framework for managing tasks and APIs.
  • MySQL: Database for storing task metadata.
  • Celery: Distributed task queue for scheduling and executing tasks.
  • RabbitMQ: Message broker for Celery, enables task persistence in case of failure.

Prerequisites

  • Python 3.13 (recommended way of installation is through pyenv, refer to the pyenv installation page)
  • docker (refer to the docker engine installation page)
  • docker-compose (refer to the docker compose installation page)
  • direnv (automatic environment setup tool, refer to the direnv installation page) Note: Don't forget to add the following block to the ~/.bashrc file:
    if command -v -- direnv > /dev/null 2>&1; then
    eval "$(direnv hook bash)"
    fi
  • pipenv (python dependency and virtualenv management tool, install by running python -m pip install pipenv) Note: Direnv automatically creates a virtual environment in the repository and installs the required Python dependencies, provided it has been correctly configured.

Getting started

Note: Make sure you are in the project root directory

  1. Allow direnv to load environment variables and create python virtual environment with required python dependencies:

    direnv allow
  2. Start the services: Note: This step will automatically build the Docker image for the Django app using the ./Dockerfile and start the necessary side services!

    docker-compose up -d
  3. Check the status of the services to ensure they are up and running:

    docker-compose ps
  4. Access the web app at http://localhost:8000.

Running Automated Tests

A total of 9 tests have been implemented. To run them, use the following command:

docker-compose exec -it web python manage.py test

About

This project provides a service for scheduling webhook calls.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published