Skip to main content

Climate aware task scheduler

Project description

DOI

CATS logo

CATS: Climate-Aware Task Scheduler

CATS is a Climate-Aware Task Scheduler. It schedules cluster jobs to minimize predicted carbon intensity of running the process. It was created as part of the 2023 Collaborations Workshop.

The Climate-Aware Task Scheduler is a lightweight Python package designed to schedule tasks based on the estimated carbon intensity of the electricity grid at any given moment. This tool uses real-time carbon intensity data from the National Grid ESO via their API to estimate the carbon intensity of the electricity grid, and schedules tasks at times when the estimated carbon intensity is lowest. This helps to reduce the carbon emissions associated with running computationally intensive tasks, making it an ideal solution for environmentally conscious developers.

Demo showing CATS scheduling a 30 minute job using the at scheduler CATS animated usage example

[!NOTE] Currently CATS only works in the UK. If you are aware of APIs for realtime grid carbon intensity data in other countries please open an issue and let us know.

Features

  • Estimates the carbon intensity of the electricity grid in real-time
  • Schedules tasks based on the estimated carbon intensity, minimizing carbon emissions
  • Provides a simple and intuitive API for developers
  • Lightweight and easy to integrate into existing workflows
  • Supports Python 3.10+

Brief example with plot to illustrate

To find the minimal carbon intensity window for a 3 hour (180 minute duration) job running at the RG1 postcode and show visually the carbon intensity curve and optimal window with the --plot argument:

$ cats --duration 180 --location "RG1" --plot
...

The.____ ..... __ .... ________ . ______...
.. /  __)...../  \....(__    __).)  ____)....
..|  /......./    \......|  |...(  (___........
..| |limate./  ()  \ware.|  |ask.\___  \cheduler
..|  \__...|   __   |....|  |....____)  )....
...\    )..|  (..)  |....|  |...(      (..


Best job start time                       = 2026-01-22 10:10:31
Carbon intensity if job started now       = 217.41 gCO2eq/kWh
Carbon intensity at optimal time          = 118.65 gCO2eq/kWh

which produced at the time run (Tue 20 Jan 15:40:21 GMT 2026) a forecast minimum of 118.65 gCO2eq/kWh for job start time 2026-01-22 10:10:31 as reported in the STDOUT above and illustrated by the resulting plot of:

CATS command run plot example output for RG1 and 3 hour job

Installation

Install via pip as follows:

pip install climate-aware-task-scheduler

To install the development version:

pip install git+https://github.com/GreenScheduler/cats

Documentation

Documentation is available at https://cats.readthedocs.io

We recommend the quickstart if you are new to CATS. CATS can optionally display carbon footprint savings using a configuration file.

Contributing

We welcome contributions from the community! If you find a bug or have an idea for a new feature, please open an issue on our GitHub repository or submit a pull request.

License

MIT License

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

climate_aware_task_scheduler-1.2.0.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

climate_aware_task_scheduler-1.2.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file climate_aware_task_scheduler-1.2.0.tar.gz.

File metadata

File hashes

Hashes for climate_aware_task_scheduler-1.2.0.tar.gz
Algorithm Hash digest
SHA256 055f709351cf0ee5cb2d7330f637444b9956be0812185aa44988c1e01642f76d
MD5 d6e0ae442e4145deded7929d9fb73db7
BLAKE2b-256 d99175f09d8838a62e8248ed885bf64f403d4f7acb615b3025381bd22bb31d8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for climate_aware_task_scheduler-1.2.0.tar.gz:

Publisher: publish.yml on GreenScheduler/cats

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file climate_aware_task_scheduler-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for climate_aware_task_scheduler-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b86b503fe3704d2e65cb1aace98ed07671f83d1ee3644a41bca4d6ba8d75c4ab
MD5 8eaa0639c018806801425adc7b8ac8ee
BLAKE2b-256 440fb1024717b9bc2e2af77049dec160b25cef5eb0a4cc09d2e8c7eef9c0e2e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for climate_aware_task_scheduler-1.2.0-py3-none-any.whl:

Publisher: publish.yml on GreenScheduler/cats

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page