Skip to main content

CAS

A Carbon-aware scheduler for Unix jobs
Report Bug · Request Feature · Contribute

About Carbon Aware Scheduler

Carbon Aware Scheduler (CAS) is a command line tool that takes CO2 into account when scheduling jobs. Given a job, this tool will find the best time to run this job based on a model of carbon intensity of the power grid. The amount of CO2 emitted per kWh (the aforementioned carbon intensity) often varies greatly during the day, so smart scheduling can reduce CO2 emissions. The model is based on heuristics and it's currently only available for the Netherlands. The tool is a wrapper around the cron and at tools for scheduling Unix commands.

This tool can help you:

  • Schedule non-urgent jobs at a later time during the day
  • Save CO2 and visualize total CO2 saved
  • Easily manage your cron and at jobs

(back to top)

Built With

This project was built in Python. Its main dependencies are:

The project also imports requests, but we do not actually use it in live code in the project. This is due to us not getting access to the ElectricityMap API in time for this project.

(back to top)

Getting Started

Here are the instructions on getting started with our tool. Whether you want to use this tool to become more environmentally-friendly or simply contribute to a tool that changes the world, you can find the instructions here.

Installation

If you simply want to use the app and benefit from the carbon aware-scheduling, simply run:

pip install carbon-aware-scheduler

Importantly, this project does not support Python 3.10 at this time due to a bug.

Contributing

In order to contribute to this project,

  1. Fork the repo using the web interface or using the gh CLI:

    gh repo fork https://github.com/abel-vs/carbon-scheduler --clone
    
  2. Install the requirements

    pip install -r requirements.txt
    
  3. Make some commits!

  4. Open a Pull Request

(back to top)

Usage

Some useful commands:

  1. Scheduling a one-off job

    $ cas myjob.py --repeat @daily

  2. Scheduling a repeating job

    $ cas myjob.py --at 202204052230

  3. Listing all the scheduled jobs, repeating and one-off jobs

    $ cas --list

  4. Cancelling a repeating job given the index

    $ cas --cancel-repeating 42

  5. Cancelling a one-off job given the index

    $ cas --cancel-one 42

(back to top)

Roadmap

  • Schedule jobs

    • Given estimate of duration and deadline
    • Taking into account carbon intensity of the grid
  • List jobs

    • Combined view of all jobs: one-off and repeating
  • Remove jobs given id of task

  • Implement offline model based on energymap's historical data on energy mix

    • Location set to NL only
    • Use time of the day
    • Use day of the week
    • Use week/month/season of the year
  • Output saved CO2

    • For current session
    • For all sessions
  • Run parallel jobs

  • "Full of batteries basement" flag -> don't use energy data for scheduling

  • Implement online/live model

    • Based on forecasting marginal carbon intensity
  • GUI for non-technical users

  • Windows platform support

  • Extensive testing

  • Consider machine workload

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contact

Wander Siemers - wandersiemers@me.com

Abel Van Steenweghen - Abel.van.steenweghen@gmail.com

Florentin-Ionut Arsene - arsene.florentin.ionut@gmail.com

(back to top)

Acknowledgments

  • Luís Cruz - Assistant Professor at Delft University of Technology

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Metadata

Release files for carbon-aware-scheduler 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for carbon-aware-scheduler 1.0.2
File Size Uploaded Provenance Actions
carbon-aware-scheduler-1.0.2.tar.gz 11.6 kB Without provenance Details for carbon-aware-scheduler-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for carbon-aware-scheduler 1.0.2
File Interpreter ABI Platform Actions
carbon_aware_scheduler-1.0.2-py3-none-any.whl Python 3 none any Details for carbon_aware_scheduler-1.0.2-py3-none-any.whl

Total release size: 25.4 kB

Release files / carbon-aware-scheduler-1.0.2.tar.gz

Download URL carbon-aware-scheduler-1.0.2.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b55ebc6e73d6e654215e08f9f576c0535d4b5320c536c5cd7e56494a439e6e2c
BLAKE2b-256 checksum
How to use checksums
fd9d57e8f339c457baad9c53daa7b2d2f413bbe07632cfb4ed05e14bebb54af4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.0

Release files / carbon_aware_scheduler-1.0.2-py3-none-any.whl

Download URL carbon_aware_scheduler-1.0.2-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7d6f443fc9f599e3cb0b0b0b3ffb3a02edd6f128a68d3d5e2b9aa84ddae4bdc
BLAKE2b-256 checksum
How to use checksums
9f6bc886e4c9f1400c7458c7f1e81babbe612dcb4ad126b2bb949260d28be461
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.0

Security for carbon-aware-scheduler 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page