Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Avec Cloud Scheduler, vous pouvez configurer des unités de travail planifiées qui seront exécutées à des heures spécifiques ou à intervalles réguliers. Ces unités de travail sont communément appelées tâches Cron. Parmi les cas d'utilisation typiques, on peut citer l'envoi quotidien d'un e-mail de rapport, l'actualisation de données mises en cache toutes les 10 minutes, ou encore la mise à jour d'informations de synthèse une fois par heure.
Chaque job Cron créée à l'aide de Cloud Scheduler est envoyée à une cible selon un calendrier spécifié, lequel permet de préciser quand le travail associé à la tâche doit être accompli.
La cible doit être l'un des types suivants :
Cloud Scheduler est conçu pour fournir une exécution de type "au moins une fois". En d'autres termes, la tâche s'exécutera au moins une fois par exécution planifiée. Dans de rares cas, il est possible qu'un job s'exécute plusieurs fois en association avec une seule instance de la planification. Votre code doit donc garantir qu'une exécution répétée n'entraîne pas d'effets secondaires néfastes. Vos cibles doivent être idempotentes.
Si votre cible est un point de terminaison HTTP/S ou un sujet Pub/Sub, Cloud Scheduler est disponible dans toutes les régions Google Cloud compatibles avec Cloud Scheduler.
Si votre cible est une application App Engine située dans votre projet actuel :
Une tâche Cloud Scheduler ciblant App Engine ne peut être créée que dans la région App Engine du projet.
Un projet Google Cloud ne peut contenir qu'une seule application App Engine. La région dont dépend l'application App Engine ne peut plus être modifiée une fois l'application créée.
App Engine est régional, ce qui signifie que l'infrastructure qui exécute votre application est située dans une région spécifique. Si vous souhaitez distribuer des calculs et des jobs sur plusieurs régions, vous devez plutôt cibler un point de terminaison HTTP/S ou un thème Pub/Sub.
Si vous n'utilisez pas App Engine comme cible, vous n'avez pas besoin de déployer d'application App Engine et vous pouvez désactiver toute application App Engine existante.
Stratégie de nouvelle tentative pour les jobs
Si une tâche Cloud Scheduler ne se termine pas correctement et qu'aucun accusé de réception n'est reçu du gestionnaire de tâches, une nouvelle tentative est effectuée avec un intervalle exponentiel entre les tentatives en fonction de la règle de nouvelles tentatives configurée.
Vous pouvez configurer les paramètres qui déterminent le comportement des nouvelles tentatives. Pour en savoir plus, consultez Réessayer d'exécuter des tâches.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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)."]]