Planificateur d'instances
Start and stop non-production servers on a weekly schedule to stop paying for idle hours.
Planificateur d'instances
Éteignez les serveurs hors production la nuit et le week-end, puis rallumez-les le matin, afin de ne plus payer pour les heures où personne ne les utilise.
- C'est le seule fonctionnalité CostGlass qui change votre cloud. Il s'agit d'une adhésion volontaire et elle ne peut que démarrer et arrêter les choses.
- A job that runs every 30 minutes compares every scheduled server with its schedule and starts or stops it to match.
- Works on virtual machines, scaling groups and managed databases on AWS, Azure, Google Cloud, Oracle Cloud and Alibaba Cloud (databases: AWS RDS, Azure PostgreSQL and MySQL Flexible Server, Google Cloud SQL).
- Un groupe Auto Scaling est mis à l'échelle jusqu'à 0 et inversement, et n'est pas arrêté. Un serveur qui appartient à un groupe doit être planifié via son groupe.
- Tag your dev and test resources and a tag policy schedules them for you. A schedule you make by hand always wins over a policy.
- Stopping a database ends its compute charge only. Storage and backups keep billing. Do not schedule anything that holds data only in memory unless a restart is safe.
Pourquoi l'utiliser
Les serveurs de développement, de test et de préparation sont souvent utilisés uniquement pendant les heures de travail, mais ils fonctionnent (et sont facturés) toutes les 168 heures de la semaine. Un serveur qui fonctionne du lundi au vendredi, de 8h00 à 19h00, exécute 55 de ces heures, donc environ les deux tiers de son coût de calcul sont évitables. La page montre les économies pour vos propres serveurs et ne s'appuie pas sur une réclamation générale.
La seule autorisation d'écriture et comment la désactiver
| Nuage | Ce qui est accordé | Comment |
|---|---|---|
| AWS | ec2:StartInstances and ec2:StopInstances on instances, rds:StartDBInstance and rds:StopDBInstance on RDS instances, and autoscaling:UpdateAutoScalingGroup on Auto Scaling groups. Rien d'autre. | Une partie du rôle CostGlass créé par le modèle d'intégration. It is controlled by the ActiverInstanceScheduler paramètre, qui par défaut est vrai. In the connection wizard it appears as the Instance Scheduler feature. |
| Azure | A custom role with virtualMachines read, start and deallocate actions, scale-set read and write, and read, start and stop on PostgreSQL and MySQL Flexible Servers. | La page inclut la définition du rôle dans un guide de configuration que vous copiez dans le portail Azure. |
| Google Cloud | Permission to start and stop instances, resize managed instance groups, and change a Cloud SQL instance’s activation policy. Never create or delete. | Consultez le guide de configuration sur la page. |
Éteignez-le (AWS)
Redeploy your CostGlass stack with ActiverInstanceScheduler réglé sur FAUX (or untick Instance Scheduler in the connection wizard and deploy the new template). Le rôle n’a alors aucune autorisation d’écriture et la planification cesse de fonctionner. Aucun autre changement n’est nécessaire. Les plannings existants restent dans CostGlass mais ne peuvent pas agir.
Créer un planning
- L'autorisation du planificateur activée pour le compte (section précédente).
- Vos serveurs découverts par CostGlass (voir Ressources cloud). Si aucun n’est trouvé, la page l’indique.
- Un serveur hors production où un arrêt est sécurisé.
A schedule is a named set of hours, such as “Weekdays 08:00-19:00”. You make it once and apply it to any number of servers, directly or through a tag policy. Changing the schedule changes everything that follows it.
Switch a schedule off on its card to pause every server that follows it, and switch it on to resume. Servers are left running while it is paused. To stop scheduling one server, open it and choose Remove schedule; the server is left in whatever state it is in.
Que se passe-t-il ensuite
Un travail s'exécute every 30 minutes. Pour chaque planification activée, il détermine, en utilisant le fuseau horaire, si le serveur doit être en cours d'exécution ou arrêté en ce moment, le compare à l'état réel et le démarre ou l'arrête s'ils diffèrent. Because it checks the desired state every 30 minutes rather than firing at an exact minute, a missed run corrects itself on the next one. The practical effect: a start or stop happens within 30 minutes after the time you set.
Commencez maintenant et arrêtez maintenant
Sous l'éditeur, Start now et Stop now agissent immédiatement (une fois). For an Azure VM the stop button is Deallocate now; for an Auto Scaling group they are Scale up and Scale to 0. Un court message vous indique le résultat. Si la cible est déjà dans l'état demandé, l'action est enregistrée comme ignorée.
Exécutez l'application maintenant
The play button at the top of the page runs a pass straight away instead of waiting for the next check. Un message indique combien ont été démarrés et arrêtés.
Différents types de cibles
| Cible | Arrêter fait | Démarrer fait |
|---|---|---|
| Instance EC2 | Arrête l'instance. | Démarre l'instance. |
| Groupe Mise à l'échelle automatique | Remembers the group's minimum and desired capacity, then sets them to 0 (shown as Scaled to 0). La propre dimension du groupe ne peut pas lutter contre le calendrier. | Restores the remembered values (shown as Scaled up). |
| Machine virtuelle Azure | Appels Désallouer, pas un simple arrêt, donc la facturation informatique s'arrête vraiment. Une machine virtuelle Azure simplement arrêtée reste allouée et continue d’être facturée. | Démarre la VM. |
| Instance Google Cloud | Arrête l'instance. | Démarre l'instance. |
| Oracle Cloud instance | Soft stop. Standard and flexible VM shapes stop billing for compute; bare-metal, dense-I/O and GPU shapes keep their compute charge, so no saving is shown for them. | Démarre l'instance. |
| Alibaba ECS instance | Stops in economical mode (StopCharging), so a pay-as-you-go VPC instance stops billing for compute. Subscription (PrePaid) instances are not offered because they are billed either way. | Démarre l'instance. |
| AWS RDS database | Appels stop-db-instance. Compute stops billing; storage and backups do not. RDS starts a stopped database again after 7 days, so every check re-reads the live state and stops it again. | Calls start-db-instance. |
| Azure PostgreSQL or MySQL Flexible Server | Stops the server (compute billing stops; storage does not). Azure PostgreSQL also restarts after 7 days and is stopped again at the next check. | Starts the server. |
| Google Cloud SQL instance | Sets the activation policy to NEVER. The Google console may still show the instance as runnable; CostGlass reads the policy. | Sets the activation policy to ALWAYS. |
| Scaling group (Auto Scaling group, VM Scale Set, managed instance group, instance pool, Alibaba scaling group) | Remembers the size, holds the group’s own autoscaler off, and scales the group to 0. | Restores the size, then puts the autoscaler back as it was. |
Databases that are not offered
Some databases cannot be stopped by the provider, or are risky to stop, so they are listed with the reason and no schedule: Aurora and other cluster members, RDS read replicas and databases that have replicas, RDS for SQL Server in Multi-AZ, Azure servers with high availability or replication, and Cloud SQL read replicas. The saving shown for a database is its compute share only, and is blank where CostGlass has no list price for the size.
Servers that belong to a group
A server that belongs to an Auto Scaling group, VM Scale Set, managed instance group, instance pool or Alibaba scaling group cannot be scheduled on its own: the group would start a replacement for the one you stopped, so nothing would be saved. By default these are hidden. If you try to save a schedule for one, CostGlass refuses (a 409 conflict) and moves you to the group instead. Group members are hidden from the list; open the group to see its behaviour. Every check compares the live group with the schedule, so if something adds servers back during off hours they are removed again at the next check.
Nodes of managed Kubernetes clusters (AKS, GKE, OKE, ACK) are not offered either, because the cluster autoscaler replaces them. CostGlass recognises Azure and Google nodes from the labels those services set. For Oracle and Alibaba it relies on tags the services add to nodes, which is not a documented guarantee, so check the target list before scheduling a cluster account.
Comment lire la page
Cards
- Scheduled
- Targets with a schedule, out of everything schedulable, split into those scheduled through tags and those scheduled directly.
- Running now
- Targets running at this moment, with an estimate of what they cost per day at current usage.
- Projected saving
- Une estimation : le coût à la demande des serveurs planifiés multiplié par la part de la semaine pendant laquelle ils seront hors service. Il est projeté, non mesuré, et est basé sur l’estimation du prix catalogue de CostGlass.
- Not scheduled
- Schedulable targets with no schedule that do not look like production.
Onglets
| Onglet | Ce que ça montre |
|---|---|
| Instances | Every discovered target with its cloud, state, tags, schedule, hourly cost and monthly saving. Search and filter by cloud, state and schedule. Click a row to set its schedule, stop dates or start and stop it now. Group members are hidden because the group is what you schedule. |
| Schedules | One card per schedule with its week grid, how many servers follow it, hours off per week and monthly saving, and a switch to pause it. The scheduler activity feed sits beside it. |
| Tag policies | The ordered list of rules that apply a schedule by tag. |
Buttons at the top
The bell opens Shutdown warnings, the play button runs a scheduler check now, and the information button opens this guide.
Scheduler activity
The feed lists what the scheduler did most recently: which server, started or stopped, by a schedule or by hand, and whether it failed. Hover an entry for the detail. A failure is usually a missing permission. Entries recorded as simulé mean no real action was taken, which happens for demonstration accounts and for connections with no credentials.
Schedule by tag
A tag policy says “everything tagged env=dev follows Weekdays 08:00-19:00”. Open the Tag policies tab and choose New tag policy: name it, pick the tag key and whether the value must equal or start with your text (leave the value empty to match any value), choose the schedule and the clouds. The preview lists exactly what it would schedule and what it would skip, with the reason. Saving creates ordinary schedules for the matching resources, so they appear in the list marked with the policy name and behave like any other schedule.
| Tag on the resource | Signification |
|---|---|
cg-schedule-timezone=Europe/London | Timezone of the schedule a policy creates for this resource. Without it the schedule’s own timezone applies. |
cg-stop-from=2026-12-12 et cg-stop-to=2027-01-05 | Stays stopped from the first day to the last day, both included, then the weekly schedule resumes (or, with no weekly schedule, it simply runs again). Both tags are required, in YYYY-MM-DD form. These work with or without a policy. |
- Order matters. Policies are numbered; if several match a resource, the first one wins. Use the arrows to move a policy up or down.
- Tag keys and values are not case sensitive. A bad value (a date that is not a date, an unknown timezone, only one of the two date tags) is ignored and flagged on the page, so a typo never schedules the wrong thing.
- New and re-tagged resources are picked up on the next check after discovery. A resource that loses its tag is released, and started again first if the scheduler had stopped it.
- A schedule you made by hand on a resource always wins; a policy never changes it (a tag stop window is still added to it).
- Pausing a schedule pauses the policies that use it, and the policy shows Schedule paused. A schedule that a policy or server uses cannot be deleted.
- Resources that cannot be scheduled (group members, Kubernetes nodes, databases the provider cannot stop, connections without the scheduler permission) are skipped, and the preview says why.
- Exclude from policy on a resource stops the policy managing it. Deleting a policy removes its schedules and starts anything it had stopped.
- Saving a policy changes nothing in your cloud by itself. The next scheduler check does, and it stops anything outside the window at that moment.
Stop dates and public holidays
Besides its weekly schedule, a VM, scaling group or database can have any number of stop dates: whole days it stays stopped, such as a year-end shutdown or the public holidays of the office’s country. Open the resource, then Open calendarunder the schedule. Click the first and last day, add an optional label, and Add dates; Save stop dates stores them.
- The days are in the schedule’s timezone, first and last day included. On those days the target is stopped whatever the weekly schedule says; on every other day the weekly schedule applies.
- A target with no weekly schedule can have stop dates only: it runs outside them and is stopped inside them.
- The calendar suggests the public holidays of the country the timezone belongs to (for example Europe/London → United Kingdom, England). Change the country or region, tick the holidays you want, or add all the upcoming ones. A holiday that falls on a day the weekly schedule is already off changes nothing.
- Dates that come from
cg-stop-from/cg-stop-totags show as “from tags” and cannot be edited in the calendar; change the tag instead. - Stop dates that have passed are removed automatically. Holiday data comes from an open-source holiday library and can differ from your company’s own calendar, so check the list before saving.
- Stop dates stop the target at the first scheduler check on the first day (which may be a few minutes after midnight) and start it again at the check after the last day ends, if the weekly schedule says it should be running.
Resources that look like production
A resource whose name contains the word prod, prd, production ou live (as a word, so “web-prd-01” counts but “product-catalog” does not), or whose env / environnement / stage tag says so, is marked PROD? in red in the list. Before you create or change a schedule or add stop dates for one, a red notice names it and you must tick a box accepting responsibility; the save is refused without it, and the audit log records that you accepted.
- A tag policy that would cover such resources shows the same notice with their names in the preview. Once you accept it, the policy includes production-looking resources; until then it skips them and says why.
- Pausing a policy or removing stop dates needs no acceptance.
- This is a name and tag check, not a guarantee. A production resource with an unrelated name is not flagged, so you stay responsible for what you schedule. Resources scheduled by
cg-stop-from/cg-stop-totags are not checked, because setting the tag in your cloud is the explicit action.
Shutdown warnings and delay links
The scheduler can warn you before it stops something. Under Shutdown warnings (the bell at the top of the Instance Scheduler page), switch warnings on, add one or more email, Slack or Microsoft Teams channels, and choose how far ahead to warn. Each warning names the resource, the stop time in its own timezone, the rule behind it and who created it, with buttons to delay the shutdown by 1 hour, 2 hours, 3 hours or for the rest of the day.
- A button opens a confirmation page and changes nothing until you press confirm there (mail scanners and chat apps open links automatically, so a click alone never applies a delay).
- A delay counts from the planned stop time; “for the day” runs to midnight in the schedule’s timezone. The normal schedule resumes afterwards, and you get another warning before the new stop.
- Warnings are checked each time the scheduler runs (every 30 minutes), so one arrives up to 30 minutes or more ahead, never later than the stop. Choose a longer lead time to be warned earlier.
- The person who created each schedule can also be emailed. For tag policies that is the person who created the policy.
- If many resources stop at once, the first ten get their own warning with delay links; the rest are listed in one summary that links to the page, where you can delay each of them.
- A delay is refused if the target has already stopped. Starting it again is done from the page after signing in.
- Links are signed and expire two hours after the stop time. Anyone who receives a warning can use its links, so every delay is recorded in the audit log as made through a notification link, with the new end time, rather than under a person’s name.
Who created a schedule (audit trail)
Every change is written to the audit log under Settings → Audit log with the person who made it: schedules created, changed, removed or excluded from a policy, stop dates added or removed, manual starts and stops, and tag policies created, edited, paused or deleted. Changes CostGlass makes by itself are recorded with the source System and say why (the tag policy, or the tags on the resource).
- The schedule editor shows how the schedule was set up, who created it and who last changed it.
- Each start or stop in the activity feed ends with the rule that caused it and who or what set that rule up, so a target that was stopped by mistake can be traced to a person, a policy or a tag.
- For schedules that come from
cg-tags CostGlass cannot see who set the tag in your cloud. Check your cloud’s own audit log (CloudTrail, Azure Activity Log, Cloud Audit Logs).
Risques et bonnes pratiques
- Databases: a stop ends the compute charge only, connections are dropped, and an application that cannot reconnect after the morning start will fail. Test on one non-critical database first.
- Vérifiez ce qui démarre au démarrage. Un serveur qui nécessite des étapes manuelles après un redémarrage sera en panne le matin.
- Les adresses IP publiques peuvent changer lorsqu'une instance EC2 est arrêtée et démarrée, sauf si vous utilisez une adresse IP Elastic.
- Dites-le à l’équipe. Ajoutez la planification à votre runbook pour que personne ne se demande pourquoi un serveur est éteint.
- Laissez les serveurs de production non planifiés, sauf si vous avez une raison délibérée.
- Préférez les planifications sur les groupes Auto Scaling pour les flottes, afin que la propre mise à l’échelle du groupe ne soit pas perturbée.
- La capacité réservée et les Savings Plans sont payés, que le serveur fonctionne ou non. L'arrêt d'un serveur couvert ne permet pas d'économiser de l'argent sur la partie couverte (voir Engagements d'économies).
Questions fréquemment posées
ActiverInstanceScheduler to false on your AWS stack and do not grant the Azure or Google write roles.