# NOT RUN {
# }
# NOT RUN {
cr_project_set("my-project")
cr_region_set("europe-west1")
cr_schedule("test",
"* * * * *",
httpTarget = HttpTarget(uri="https://code.markedmondson.me"))
# schedule a cloud build (no source)
build1 <- cr_build_make("cloudbuild.yaml")
cr_schedule("cloud-build-test", "15 5 * * *",
httpTarget = cr_build_schedule_http(build1))
# schedule a cloud build with code source from GCS bucket
my_gcs_source <- cr_build_upload_gcs("my_folder", bucket = cr_get_bucket())
build <- cr_build_make("cloudbuild.yaml", source = my_gcs_source))
cr_schedule("cloud-build-test2", "15 5 * * *",
httpTarget = cr_build_schedule_http(build))
# update a schedule with the same name - only supply what you want to change
cr_schedule("cloud-build-test2", "12 6 * * *", overwrite=TRUE)
# By default will use the timezone as specified by Sys.timezone() - change
# this by supplying it directly
cr_schedule("timzone-utc", "12 2 * * *", timeZone = "UTC")
# }
Run the code above in your browser using DataLab