https://github.com/render-examples/cronjob-scaler
Blueprint to scale Render services on a schedule
https://github.com/render-examples/cronjob-scaler
Last synced: 6 months ago
JSON representation
Blueprint to scale Render services on a schedule
- Host: GitHub
- URL: https://github.com/render-examples/cronjob-scaler
- Owner: render-examples
- Created: 2023-08-04T22:53:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-05T00:09:22.000Z (over 2 years ago)
- Last Synced: 2025-06-21T06:34:26.145Z (7 months ago)
- Language: Shell
- Size: 1000 Bytes
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Render Cron Job Scaler
Simple Render cron job that scales a Render service on a schedule. To deploy:
1. Fork this repo.
2. Change the [schedule](render.yaml#L4) field so the job runs at times when you want to scale. Times are in UTC. You may also wish to change the name of the cron job to reflect when it runs.
3. Click the "Deploy to Render" button below.
4. When prompted, enter the service id for the Render service you want to scale, the number of instances you want to scale it to, and your Render API key. You can find the service ID in the URL when you visit the service's page in the Render dashboard. You can create a Render API key by following the instructions at https://render.com/docs/api#creating-an-api-key.
[](https://render.com/deploy)
A sensible pattern is to deploy two copies of this repo. For example, one that scales up on weekday mornings and one that scales down on weekday evenings. You could also modify the script so that it accepts a list of (hour, desired instance count) pairs and run a single hourly cron job that checks the list to see if it should change the instance count.