Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara menjalankan build sesuai jadwal yang telah ditentukan menggunakan
konsolGoogle Cloud . Untuk menjadwalkan build, Anda harus membuat pemicu manual, lalu memanggil pemicu menggunakan Cloud Scheduler.
Saat Anda memilih akun layanan penjadwalan default, akun tersebut akan
dibuat secara otomatis untuk Anda dengan pemberian peran IAM
Cloud Build Editor.
Sebaiknya jangan menghapus akun layanan ini karena digunakan oleh Cloud Scheduler untuk menjadwalkan build. Jika Anda tidak sengaja menghapus akun layanan ini,
atau mencabut izin IAM-nya,
Anda dapat membuka halaman IAM untuk menambahkan akun layanan secara manual
dan memberikan peran Cloud Build Editor kepadanya. Anda mungkin perlu menunggu hingga satu jam agar tugas Cloud Scheduler yang ada dilanjutkan setelah membuat ulang akun layanan.
Klik Lanjutkan.
Jika Anda belum memilih region, Anda mungkin diminta untuk memilih
region untuk tugas Cloud Scheduler sebelum melanjutkan ke
langkah berikutnya. Saat Anda memilih region, aplikasi App Engine akan otomatis dibuat di project Anda. Anda tidak dapat mengubah region untuk project Anda nanti. Untuk mempelajari lebih lanjut, lihat Region yang didukung.
Masukkan setelan tugas Cloud Scheduler berikut:
Nama: Nama untuk tugas Cloud Scheduler Anda.
Deskripsi (Opsional): Deskripsi untuk tugas Cloud Scheduler Anda.
Frekuensi: Pilih seberapa sering Anda ingin pemicu dijalankan. Anda dapat memilih frekuensi dari menu drop-down atau memasukkan nilai kustom menggunakan sintaksis cron. Misalnya, jika Anda ingin pemicu manual berjalan setiap hari pada pukul 06.00, Anda dapat menentukan frekuensi dalam sintaksis cron sebagai 0 6 * * *. Untuk mempelajari sintaksis cron lebih lanjut, lihat
Mengonfigurasi jadwal tugas cron.
Zona Waktu: Pilih zona waktu Anda.
Klik Create untuk membuat tugas Cloud Scheduler.
Anda dapat membuat beberapa tugas penjadwal untuk setiap pemicu manual.
Jika Anda ingin melihat tugas Cloud Scheduler, klik
Lihat. Jika tidak, klik Selesai untuk menutup panel.
Memperbarui tugas Cloud Scheduler
Jika Anda memperbarui kolom Revisi di pemicu manual, Anda harus memperbarui tugas Cloud Scheduler yang terkait dengan pemicu secara manual. Misalnya, jika Anda memperbarui nama cabang
untuk pemicu manual, Anda harus memperbarui nama
cabang secara manual di tugas Anda.
Anda akan melihat daftar tugas Cloud Scheduler Anda.
[Opsional] Identifikasi tugas Cloud Scheduler yang terkait dengan pemicu Anda:
Dapatkan ID pemicu Anda dengan menjalankan perintah berikut, dengan
TRIGGER_NAME adalah nama pemicu Anda:
gcloud builds triggers describe TRIGGER_NAME
Catat ID pemicu Anda.
Masukkan ID pemicu Anda ke dalam panel filter di bagian atas tabel.
Anda akan melihat daftar tugas Cloud Scheduler yang terkait dengan pemicu Anda.
Klik baris yang berisi nama tugas yang ingin Anda perbarui.
Klik Edit di bagian atas halaman.
Anda akan melihat formulir untuk memperbarui tugas Cloud Scheduler.
Di kolom Isi, perbarui revisi Anda.
Klik Perbarui.
Anda kini telah memperbarui revisi yang terkait dengan pemicu untuk tugas Cloud Scheduler.
Menghapus tugas Cloud Scheduler
Menghapus atau menonaktifkan
pemicu tidak akan otomatis menghapus atau menonaktifkan semua tugas Cloud Scheduler
yang dibuat secara otomatis saat Anda menjadwalkan pemicu. Tugas Anda akan
ada dan build dapat terus dipanggil.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 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,["# Schedule builds\n\nThis 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\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-----------------\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---------------------------------\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\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\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)."]]