This application enables you to schedule tasks within a given time frame at the time when carbon intensity in the grid is lowest.
Given a desired earliest start time and latest finish time, the expected duration of the task and the region where the task is run, the scheduler will determine at which time the share of renewable generation is predicted to be highest, and initiate the task by calling a provided webhook.
You can either host your own scheduler by getting it from the Azure marketplace, or use a hosted variant under: https://carbon-aware-scheduler.bluehands.de to test out how it works.
Docker files live under deployment/ and build two images:
scheduler-ui: Angular frontend bundled into the API container.scheduler-executor: Stand-alone executor that runs scheduled work.
docker build -f deployment/Dockerfile.scheduler-ui -t scheduler-ui .
docker build -f deployment/Dockerfile.executor -t scheduler-executor .docker compose -f deployment/docker-compose.yml up --build- Start Azurite (e.g. from docker-compose and stop other containers)
- create symlink wwwroot
- cmd in source/backend/CarbonAwareScheduler.Api
mklink /D wwwroot "..\..\frontend\dist\carbon-aware-scheduler\browser"
- Debug CarbonAwareScheduler.Api: https
The UI/API container listens on http://localhost:8080. The compose file also starts Azurite on ports 10000-10002.
ConnectionStrings__TableStoragepoints to Azurite by default indeployment/docker-compose.yml.- Set
EXECUTOR_LOOP=trueto run the executor in a simple loop (default is a single run);EXECUTOR_SLEEP_SECONDScontrols the interval.
The Publish Images workflow builds and pushes scheduler-ui and executor to ACR on pushes to main and version tags.
Required GitHub secrets:
AZURE_CLIENT_IDAZURE_TENANT_IDAZURE_SUBSCRIPTION_IDACR_NAME(ACR name without.azurecr.io)
Tagging behavior:
- GitVersion starts at
1.0.0and increments patch on each push tomain. - Images are tagged with the SemVer and
latest(no git sha tag). - Version tags can be
v1.2.3or1.2.3.
Image repositories:
{acr_name}.azurecr.io/carbon-aware-scheduler/scheduler-ui{acr_name}.azurecr.io/carbon-aware-scheduler/executor