A Carbon-aware scheduler for Unix jobs
Report Bug
·
Request Feature
·
Contribute
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
andat
jobs
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.
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.
If you simply want to use the app and benefit from the carbon aware-scheduling, simply run:
pip install carbon-aware-scheduler
In order to contribute to this project,
-
Fork the repo using the web interface or using the
gh
CLI:gh repo fork https://github.com/abel-vs/carbon-scheduler --clone
-
Install the requirements
pip install -r requirements.txt
-
Make some commits!
-
Open a Pull Request
Some useful commands:
-
Scheduling a one-off job
$ cas myjob.py --repeat @daily
-
Scheduling a repeating job
$ cas myjob.py --at 202204052230
-
Listing all the scheduled jobs, repeating and one-off jobs
$ cas --list
-
Cancelling a repeating job given the index
$ cas --cancel-repeating 42
-
Cancelling a one-off job given the index
$ cas --cancel-one 42
-
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).
Wander Siemers - [email protected]
Abel Van Steenweghen - [email protected]
Florentin-Ionut Arsene - [email protected]
- Luís Cruz - Assistant Professor at Delft University of Technology
Distributed under the MIT License. See LICENSE.txt
for more information.