Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
En esta página se explica cómo ejecutar compilaciones según una programación predefinida mediante la consolaGoogle Cloud . Para programar compilaciones, debes crear un activador manual y, a continuación, invocarlo mediante Cloud Scheduler.
Busca la fila que contiene el nombre del activador manual que quieres ejecutar
de forma programada.
Haz clic en el menú (elipsis verticales) situado en el extremo derecho de la fila que contiene el activador.
Haz clic en Ejecutar según la programación para programar la compilación.
Verás el panel Ejecutar el activador según una programación en la parte derecha.
Habilita la API Cloud Scheduler.
Solo se te pedirá que habilites la API Cloud Scheduler la primera vez que programes una compilación.
Selecciona la cuenta de servicio que quieres que use Cloud Scheduler al invocar el activador.
Te recomendamos que selecciones la cuenta de servicio de programación predeterminada, que tiene el siguiente formato, donde PROJECT_ID es el ID del proyecto:
Si seleccionas la cuenta de servicio de programación predeterminada, se creará automáticamente y se le asignará el rol de gestión de identidades y accesos Editor de Cloud Build.
Te recomendamos que no elimines esta cuenta de servicio, ya que Cloud Scheduler la usa para programar compilaciones. Si eliminas esta cuenta de servicio por error o revocas alguno de sus permisos de IAM, puedes ir a la página IAM para añadir manualmente la cuenta de servicio y asignarle el rol Editor de Cloud Build. Es posible que tengas que esperar hasta una hora para que se reanuden las tareas de Cloud Scheduler después de volver a crear la cuenta de servicio.
Haz clic en Continuar.
Si no has seleccionado ninguna región, es posible que se te pida que elijas una para tus tareas de Cloud Scheduler antes de continuar con el siguiente paso. Cuando selecciones una región, se creará automáticamente una aplicación de App Engine en tu proyecto. No podrás cambiar la región de tu proyecto más adelante. Para obtener más información, consulta Regiones admitidas.
Introduce los siguientes ajustes de la tarea de Cloud Scheduler:
Nombre: nombre de la tarea de Cloud Scheduler.
Descripción (opcional): descripción de la tarea de Cloud Scheduler.
Frecuencia: selecciona la frecuencia con la que quieres que se ejecute el activador. Puede elegir una frecuencia en el menú desplegable o introducir un valor personalizado con la sintaxis cron. Por ejemplo, si quieres que el activador manual se ejecute todos los días a las 6:00, puedes especificar la frecuencia en sintaxis cron como 0 6 * * *. Para obtener más información sobre la sintaxis de cron, consulta Configurar programaciones de tareas cron.
Zona horaria: selecciona tu zona horaria.
Haz clic en Crear para crear tu tarea de Cloud Scheduler.
Puedes crear varias tareas de programación para cada activador manual.
Si quieres ver tu tarea de Cloud Scheduler, haz clic en Ver. De lo contrario, haz clic en Hecho para cerrar el panel.
Actualizar una tarea de Cloud Scheduler
Si actualizas el campo Revisión de tu activador manual, tendrás que actualizar manualmente el trabajo de Cloud Scheduler asociado a tu activador. Por ejemplo, si actualizas el nombre de la rama de tu activador manual, tendrás que actualizar manualmente el nombre de la rama en tu trabajo.
Para actualizar tu tarea de Cloud Scheduler, sigue estos pasos:
[Opcional] Identifica la tarea de Cloud Scheduler asociada a tu activador:
Para obtener el ID del activador, ejecuta el siguiente comando, donde TRIGGER_NAME es el nombre del activador:
gcloud builds triggers describe TRIGGER_NAME
Anota el ID del activador.
Introduce el ID del activador en la barra de filtros situada en la parte superior de la tabla.
Verás la lista de tus tareas de Cloud Scheduler asociadas a tu activador.
Haga clic en la fila que contiene el nombre del trabajo que quiera actualizar.
En la parte superior de la página, haz clic en Editar.
Verás un formulario para actualizar tu tarea de Cloud Scheduler.
En el campo Cuerpo, actualiza la revisión.
Haz clic en Actualizar.
Ahora has actualizado la revisión asociada al activador de tu tarea de Cloud Scheduler.
Eliminar una tarea de Cloud Scheduler
Si eliminas o inhabilitas un activador, no se eliminarán ni se inhabilitarán automáticamente todos los trabajos de Cloud Scheduler que se hayan creado automáticamente al programar el activador. Tus tareas seguirán existiendo y se podrán seguir invocando compilaciones.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-21 (UTC)."],[[["\u003cp\u003eThis page outlines the process of scheduling builds on a pre-defined schedule using the Google Cloud console, by using manual triggers and Cloud Scheduler.\u003c/p\u003e\n"],["\u003cp\u003eTo schedule builds, you must first create a manual trigger and enable both the Cloud Build API and the Cloud Scheduler API.\u003c/p\u003e\n"],["\u003cp\u003eAfter creating a manual trigger, you can access the 'Run on schedule' option in the Triggers page to set up a recurring build schedule with frequency and time zone using Cloud Scheduler.\u003c/p\u003e\n"],["\u003cp\u003eUpdating the revision field in a manual trigger requires manually updating the corresponding Cloud Scheduler job with the new revision.\u003c/p\u003e\n"],["\u003cp\u003eDeleting or disabling a trigger does not automatically delete associated Cloud Scheduler jobs, so these jobs must be manually removed to stop scheduled builds.\u003c/p\u003e\n"]]],[],null,["This page explains how to run builds on a pre-defined schedule using the\nGoogle Cloud console. To schedule builds, you must [create a manual trigger](/build/docs/automating-builds/create-manual-triggers#creating_manual_triggers) and then invoke the trigger using Cloud Scheduler.\n\nBefore you begin\n\n-\n\n\n Enable the Cloud Build API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=cloudbuild.googleapis.com&redirect=https://cloud.google.com/build/docs/automating-builds/create-scheduled-triggers)\n\n\u003c!-- --\u003e\n\n- Have your source code ready.\n- If you have not already, [create a manual trigger](https://cloud.google.com/build/docs/automating-builds/create-manual-triggers). **You can only schedule builds if your trigger is a manual trigger.**\n\nScheduling builds\n\nAfter you have [created a manual trigger](https://cloud.google.com/build/docs/automating-builds/create-manual-triggers), you are ready to schedule your build.\n\nTo schedule your build:\n\n1. Open the **Triggers** page:\n\n \u003cbr /\u003e\n\n [Open the Triggers page](https://console.cloud.google.com/cloud-build/triggers)\n\n \u003cbr /\u003e\n\n2. Locate the row containing the name of the manual trigger you want to run\n on schedule.\n\n3. Click on the menu (vertical ellipses) located at the right end of the row\n containing your trigger.\n\n4. Click **Run on schedule** to schedule your build.\n\n You will see the **Run trigger on schedule** panel on the right side.\n5. Enable the **Cloud Scheduler** API.\n\n You will only be prompted to enable the **Cloud Scheduler** API the first\n time you schedule a build.\n6. Select the service account you want Cloud Scheduler to use\n when invoking your trigger.\n\n We recommend selecting the default scheduling service account, which\n has the following format where \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is the project ID for your project: \n\n cloud-build-trigger-scheduler@\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e.iam.gserviceaccount.com\n\n When you select the default scheduling service account, it will\n automatically be created for you with the\n **Cloud Build Editor** IAM role granted.\n We recommend you don't delete this service account since it is used by Cloud Scheduler to schedule builds. If you accidentally delete this service account,\n or revoke any of its IAM permissions,\n you can navigate to the [IAM page](https://console.cloud.google.com/iam-admin/iam) to manually add the service account\n and grant it the **Cloud Build Editor** role. You may need to\n wait up to an hour for any existing Cloud Scheduler jobs\n to resume after recreating the service account.\n7. Click **Continue**.\n\n If you do not have a region selected, you may be prompted to select\n a region for your Cloud Scheduler jobs before proceeding to the\n next step. When you select a region, an App Engine application\n will be automatically created in your project. You **cannot** change the region for your\n project later on. To learn more, see [Supported regions](/../scheduler/docs#supported_regions).\n8. Enter the following Cloud Scheduler job settings:\n\n - **Name**: A name for your Cloud Scheduler job.\n - **Description** (Optional): A description for your Cloud Scheduler job.\n - **Frequency** : Select how frequently you would like your trigger to run. You can choose a frequency from the drop-down menu or enter a custom value using cron syntax. For example, if you want your manual trigger to run everyday at 6 AM, you can specify your frequency in cron syntax as `0 6 * * *`. To learn more about cron syntax, see [Configuring cron job schedules](/../scheduler/docs/configuring/cron-job-schedules).\n - **Time Zone**: Select your time zone.\n9. Click **Create** to create your Cloud Scheduler job.\n\n You can create multiple scheduler jobs for each manual trigger.\n10. If you would like to view your Cloud Scheduler job, click\n **View** . Otherwise, click **Done** to close the panel.\n\nUpdating your Cloud Scheduler job\n\nIf you update the [**Revision** field in your manual trigger](/build/docs/automating-builds/create-manual-triggers), you'll need to manually update the Cloud Scheduler\njob associated with your trigger. For example, if you update the branch name\nfor your manual trigger, you will need to manually update the name of the\nbranch in your job.\n\nTo update your Cloud Scheduler job:\n\n1. Open the **Cloud Scheduler** page:\n\n \u003cbr /\u003e\n\n [Open the Cloud Scheduler page](https://console.cloud.google.com/cloudscheduler)\n\n \u003cbr /\u003e\n\n You will see a list of your Cloud Scheduler jobs.\n2. \\[Optional\\] Identify the Cloud Scheduler job associated with your trigger:\n\n 1. Obtain your trigger ID by running the following command, where\n where \u003cvar translate=\"no\"\u003eTRIGGER_NAME\u003c/var\u003e is the name of your trigger:\n\n gcloud builds triggers describe \u003cvar translate=\"no\"\u003eTRIGGER_NAME\u003c/var\u003e\n\n 2. Take note of your trigger ID.\n\n 3. Enter your trigger ID into the filter bar at the top of the table.\n\n You will see the list of your Cloud Scheduler jobs associated\n with your trigger.\n3. Click on the row containing the name of the job you want to update.\n\n4. Click **Edit** at the top of the page.\n\n You will see a form to update your Cloud Scheduler job.\n5. In the **Body** field, update your revision.\n\n6. Click **Update**.\n\nYou have now updated the revision associated with your trigger for your\nCloud Scheduler job.\n\nRemoving your Cloud Scheduler job\n\n[Deleting](/build/docs/automating-builds/create-manage-triggers#deleting_a_build_trigger) or [disabling](/build/docs/automating-builds/create-manage-triggers#disabling_a_build_trigger)\nyour trigger will **not** automatically delete or disable all Cloud Scheduler\njobs that were automatically created when you scheduled the trigger. Your jobs will\nexist and builds may continue to be invoked.\n\nTo make sure your trigger will no longer run at a specified time,\n[delete your Cloud Scheduler job](/../scheduler/docs/creating#console_1).\n\nNext steps\n\n- Learn how to [start builds manually](/build/docs/running-builds/start-build-manually) using `gcloud` commands or the Cloud Build API.\n- Learn how to [create and manage triggers](/build/docs/automating-builds/create-manage-triggers).\n- Learn how to [view build results](/build/docs/view-build-results)."]]