Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Con Cloud Scheduler configuri le unità di lavoro pianificate da eseguire a
orari definiti o a intervalli regolari. Queste unità di lavoro
sono comunemente note come cron job. I casi d'uso tipici potrebbero includere l'invio di
un'email di report su base giornaliera, l'aggiornamento dei dati memorizzati nella cache ogni 10 minuti
o l'aggiornamento delle informazioni di riepilogo una volta all'ora.
Ogni cron job creato utilizzando Cloud Scheduler viene inviato a un target
secondo una pianificazione specificata, in cui viene svolto il lavoro per l'attività.
La destinazione deve essere uno dei seguenti tipi:
Cloud Scheduler è progettato per fornire la consegna "at least once", ovvero il job verrà eseguito almeno una volta per esecuzione pianificata. In alcuni rari casi, è possibile che un job venga eseguito più volte in associazione a una singola istanza della pianificazione, pertanto il codice deve garantire che non vi siano effetti collaterali dannosi dovuti all'esecuzione ripetuta. I target devono essere
idempotenti.
Se la destinazione è un endpoint HTTP/S o un argomento Pub/Sub,
Cloud Scheduler è disponibile in tutte le
regioni supportate Google Cloud per
Cloud Scheduler.
Se la destinazione è un'applicazione App Engine che si trova all'interno del tuo progetto attuale:
Un job Cloud Scheduler che ha come target App Engine può essere
creato solo nella regione App Engine del progetto.
Un progetto Google Cloud può contenere una sola app App Engine e la regione in cui si trova l'app App Engine non può essere modificata una volta creata l'app.
App Engine è regionale, il che significa che l'infrastruttura che esegue la tua app si trova in una regione specifica. Se vuoi distribuire il calcolo e
i job in più regioni, devi scegliere come target un endpoint HTTP/S o
un argomento Pub/Sub.
Se non utilizzi App Engine come target, non devi
deployare un'app App Engine e puoi disabilitare qualsiasi
app App Engine esistente.
Policy di ripetizione del job
Se un job Cloud Scheduler non viene completato correttamente e non viene ricevuta una conferma dal gestore di job, viene eseguito nuovamente con un backoff esponenziale in base al criterio di nuovi tentativi configurato.
Puoi configurare le impostazioni che determinano il comportamento di ripetizione. Per saperne di più, consulta Riprovare i job.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[],[],null,["# About Cloud Scheduler\n\nWith Cloud Scheduler you set up scheduled units of work to be executed at\ndefined times or regular intervals. These work units\nare commonly known as *cron jobs*. Typical use cases might include sending out\na report email on a daily basis, updating cached data every 10 minutes,\nor updating summary information once an hour.\n\nEach cron job created using Cloud Scheduler is sent to a *target*\naccording to a specified schedule, where the work for the task is accomplished.\nThe target must be one of the following types:\n\n- HTTP/S endpoints\n- [Pub/Sub topics](/pubsub/docs)\n- [App Engine HTTP/S](/appengine/docs) applications\n\nCloud Scheduler is designed to provide \"at least once\" delivery;\nthat is, the job will run at least once per scheduled execution. In some rare\ncircumstances, it is possible for a job to run multiple times in association\nwith a single instance of the schedule, so your code must ensure that there are\nno harmful side-effects of repeated execution. Your targets should be\n[idempotent](https://wikipedia.org/wiki/idempotent).\n\nYou can create cron jobs using either the [Cloud console](/docs/overview#google-cloud-console)\nor the [gcloud command line tool](/sdk/gcloud).\n\nSupported regions by target\n---------------------------\n\nIf your target is an **HTTP/S endpoint** or a **Pub/Sub topic** ,\nCloud Scheduler is available in all\n[supported Google Cloud regions](/scheduler/docs/locations) for\nCloud Scheduler.\n\nIf your target is an **App Engine application** located within your\ncurrent project:\n\n- A Cloud Scheduler job targeting App Engine can only be\n created in the project's App Engine [region](/appengine/docs/locations).\n\n- A Google Cloud project can contain only one App Engine app,\n and the region where the App Engine app is located cannot be changed\n once the app is created.\n\n- App Engine is *regional* which means the infrastructure that runs\n your app is located in a specific region. If you want to distribute compute and\n jobs across multiple regions, you should target an HTTP/S endpoint or\n Pub/Sub topic instead.\n\n- If you are not using App Engine as a target, you don't need to\n deploy an App Engine app, and you can disable any existing\n App Engine app.\n\nJob retry policy\n----------------\n\nIf a Cloud Scheduler job doesn't complete successfully, and an\nacknowledgement isn't received from the job handler, it is retried with an\nexponential backoff according to its configured retry policy.\n\nYou can configure the settings that determine the retry behavior. For more\ninformation, see [Retry jobs](/scheduler/docs/configuring/retry-jobs)."]]