Schedule Google Cloud STS Transfer Job with Cloud Scheduler

Prerequisites

Configuration

  1. Go to Cloud Scheduler. Create a new job. Specify the schedule/frequency. If you want it to run every 10 min starting at the hour, then set “0,10,20,30,40,50 * * * *”. Select timezone then click Continue.
https://storagetransfer.googleapis.com/v1/transferJobs/<STS job name>:run?alt=json
{     "projectId": "<project_ID>"}

Notes:

  1. If the Storage Transfer Service (STS) job is still running when Cloud Scheduler job triggers a new execution, the STS will respond with error 400 and the existing STS job will continue running until completion. Hence consider STS job’s Run History, not Cloud Scheduler job’s log, as the source of truth when checking if a run is successful or not.
  2. At the time of writing, there is no charge for STS except when data transfer is from on-premise which is charged at $0.0125 per GB transferred to the destination successfully.
  3. Cloud Scheduler adds negligible cost. At the time of writing, first 3 jobs per Google account are free. Subsequent jobs are charged $0.10 per job per month.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store