Programador de instancias

Start and stop non-production servers on a weekly schedule to stop paying for idle hours.

Programador de instancias

Apague los servidores que no sean de producción por la noche y los fines de semana, y vuelva a encenderlos por la mañana, para dejar de pagar por las horas en que nadie los usa.

Where in CostGlassCosts → Instance Scheduler
PlanGrowth and above (the menu item is greyed out on lower plans)
Who can do thisWhoever can open the page. Para configurar el permiso en su nube se necesita un administrador.
Time needed10 minutes to enable, 2 minutes per schedule
En resumen
  • Es el única característica de CostGlass que cambia su nube. Es una opción voluntaria y solo puede iniciar y detener cosas.
  • 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 grupo de Auto Scaling se escala a 0 y viceversa, no se detiene. Un servidor que pertenece a un grupo debe programarse a través de su grupo.
  • 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.
The Instance Scheduler: summary cards, the Instances, Schedules and Tag policies tabs.

Por qué usarlo

Los servidores de desarrollo, prueba y preparación a menudo se utilizan solo durante el horario laboral, pero funcionan (y se facturan) las 168 horas de la semana. Un servidor que funciona de lunes a viernes, de 08:00 a 19:00, funciona 55 de esas horas, por lo que aproximadamente dos tercios de su costo de computación se pueden evitar. La página muestra el ahorro para sus propios servidores y no se basa en un reclamo general.

Nota
Detener un servidor ahorra su carga informática. El almacenamiento adjunto (discos) y algunos otros elementos aún se facturan mientras el servidor está detenido, por lo que el ahorro es menor que el costo total del servidor.

El único permiso de escritura y cómo desactivarlo

Este es el único lugar donde CostGlass puede cambiar su nube
En todos los demás, CostGlass es estrictamente de sólo lectura. El programador necesita permiso para iniciar y detener servidores. Nunca se solicita ningún otro permiso de escritura.
NubeQué se concedeCómo
AWSec2:StartInstances and ec2:StopInstances on instances, rds:StartDBInstance and rds:StopDBInstance on RDS instances, and autoscaling:UpdateAutoScalingGroup on Auto Scaling groups. Nada más.Parte del rol de CostGlass creado por la plantilla de incorporación. It is controlled by the HabilitarInstanceScheduler parámetro, que por defecto es verdadero. In the connection wizard it appears as the Instance Scheduler feature.
AzureA 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 página incluye la definición de rol en una guía de configuración que se copia en Azure Portal.
Google CloudPermission to start and stop instances, resize managed instance groups, and change a Cloud SQL instance’s activation policy. Never create or delete.Consulte la guía de configuración en la página.

Apáguelo (AWS)

Redeploy your CostGlass stack with HabilitarInstanceScheduler empezar a FALSO (or untick Instance Scheduler in the connection wizard and deploy the new template). Entonces, el rol no tiene ningún permiso de escritura y la programación deja de funcionar. No se necesita ningún otro cambio. Los cronogramas existentes permanecen en CostGlass pero no pueden actuar.

Nota
The page also has a How to Enable on AWS, Azure, Alibaba, OCI guide with copyable policies. Scheduling covers EC2 instances, Auto Scaling groups and RDS databases, Azure VMs, VM Scale Sets and Flexible Server databases, Google Cloud instances, managed instance groups and Cloud SQL, Oracle Cloud instances and instance pools, and Alibaba Cloud ECS instances and scaling groups. Databases use the same permission switch as the cloud’s other scheduler permissions; there is no separate database switch. Oracle and Alibaba connections are read-only until you switch on Instance Scheduler for the connection in Cloud Accounts and apply the extra permission it shows. DigitalOcean and Linode are not offered, because both keep billing a powered-off server.

Crear un horario

Antes de empezar
  • El permiso del programador habilitado para la cuenta (sección anterior).
  • Sus servidores descubiertos por CostGlass (consulte Recursos en la nube). Si no se encuentra ninguno, la página lo dice.
  • Un servidor que no es de producción donde una parada es segura.

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.

1
Abre la página
Go to Costs → Instance Scheduler and open the Schedules tab.
2
Click New schedule
Give it a name, pick the time zone your team works in (daylight saving is handled for you), the start and stop times and the days. The week grid shows exactly when servers run. Se admite una ventana nocturna (por ejemplo, inicio a las 22:00, parada a las 06:00); su día activo es el día que abre.
3
Apply it
Either open a server on the Instances tab and choose the schedule, or create a tag policy to apply it to everything with a tag (next sections). A server can also have its own Custom times.

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.

¿Qué pasa después?

Se ejecuta un trabajo every 30 minutes. Para cada programación habilitada, calcula, utilizando la zona horaria, si el servidor debería estar ejecutándose o detenido en este momento, lo compara con el estado real y lo inicia o detiene si difieren. 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.

Un servidor iniciado manualmente fuera de su ventana normalmente se detendrá nuevamente
The 30-minute check enforces the schedule. Si alguien inicia un servidor programado por la noche, espere que se detenga en la siguiente pasada. To work late, change the schedule or untick Schedule active on the server, or pause the schedule.

Empezar ahora y detener ahora

En el editor, Iniciar ahora y Detener ahora actúan inmediatamente (una vez). For an Azure VM the stop button is Deallocate now; for an Auto Scaling group they are Scale up and Scale to 0. Un breve mensaje le informa el resultado. Si el objetivo ya se encuentra en el estado solicitado, la acción se registra como omitida.

Ejecute la aplicación de la ley ahora

The play button at the top of the page runs a pass straight away instead of waiting for the next check. Un mensaje informa cuántos se iniciaron y se detuvieron.

Diferentes tipos de objetivos

ObjetivodetenerseInicio hace
instancia EC2Detiene la instancia.Inicia la instancia.
Grupo de escala automáticaRemembers the group's minimum and desired capacity, then sets them to 0 (shown as Scaled to 0). El propio escalamiento del grupo no puede competir con el cronograma.Restores the remembered values (shown as Scaled up).
Máquina virtual de AzureLlamadas Desasignar, no es una simple parada, por lo que la facturación informática realmente se detiene. Una máquina virtual de Azure detenida permanece asignada y sigue facturando.Inicia la máquina virtual.
Instancia de Google CloudDetiene la instancia.Inicia la instancia.
Oracle Cloud instanceSoft 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.Inicia la instancia.
Alibaba ECS instanceStops 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.Inicia la instancia.
AWS RDS databaseLlamadas 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 ServerStops 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 instanceSets 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.

Cómo leer la página

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
Una estimación: el costo bajo demanda de los servidores programados multiplicado por la parte de la semana que estarán inactivos. Se proyecta, no se mide, y se basa en la estimación del precio de lista de CostGlass.
Not scheduled
Schedulable targets with no schedule that do not look like production.

Pestañas

Pestañalo que muestra
InstancesEvery 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.
SchedulesOne 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 policiesThe 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 simulado 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 resourceSignificado
cg-schedule-timezone=Europe/LondonTimezone of the schedule a policy creates for this resource. Without it the schedule’s own timezone applies.
cg-stop-from=2026-12-12 y cg-stop-to=2027-01-05Stays 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-to tags 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 pinchar, prd, producción o live (as a word, so “web-prd-01” counts but “product-catalog” does not), or whose env / ambiente / 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-to tags 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).

Riesgos y buenas prácticas

Cargas de trabajo con estado
Detener un servidor finaliza todo lo que se ejecuta en él. Do not schedule message brokers, caches, build agents mid-job, or anything that holds important data only in memory or on instance-store disks. En caso de duda, pruebe primero en un servidor.
  • 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.
  • Compruebe lo que comienza en el arranque. Un servidor que necesita pasos manuales después de reiniciarse fallará por la mañana.
  • Las direcciones IP públicas pueden cambiar cuando se detiene e inicia una instancia EC2, a menos que utilice una IP elástica.
  • Díselo al equipo. Agregue la programación a su runbook para que nadie se pregunte por qué un servidor está apagado.
  • Deje los servidores de producción sin programar a menos que tenga un motivo deliberado.
  • Prefiera programaciones en grupos de Auto Scaling para flotas, de modo que el escalamiento del grupo no se vea afectado.
  • La capacidad reservada y los Planes de Ahorro se pagan independientemente de que el servidor funcione o no. Detener un servidor cubierto no ahorra dinero en la parte cubierta (ver Compromisos de ahorro).

Preguntas frecuentes

La página dice que no se encontraron instancias.
El descubrimiento aún no ha encontrado computación en una cuenta conectada. Consulte Recursos en la nube y verifique que la cuenta tenga acceso en vivo.
Mi agenda se guardó pero no pasó nada.
The job runs every 30 minutes, so allow up to half an hour. Then check the scheduler activity feed. Una fila fallida con un mensaje de permiso generalmente significa que el permiso del programador no está habilitado para esa cuenta. Un resultado simulado significa que la cuenta no tiene credenciales reales.
¿Puedo ejecutarlo sólo entre semana?
Sí. Select Mon to Fri in the day chips, or use Weekday business hours.
¿Puedo mantener CostGlass como totalmente de solo lectura?
Sí. Colocar HabilitarInstanceScheduler to false on your AWS stack and do not grant the Azure or Google write roles.
¿El ahorro incluye almacenamiento?
No. Los discos se siguen facturando mientras el servidor está detenido. El ahorro proyectado se basa únicamente en cálculos.
Why can I not schedule my Aurora cluster or a read replica?
Aurora and cluster members are stopped at the cluster level, which is not supported yet, and the providers cannot stop read replicas. The page lists each one with the reason.
¿Por qué no puedo programar una instancia EC2?
Pertenece a un grupo de Auto Scaling. En su lugar, programe el grupo.

Guías relacionadas