0

I am using google's python sdk (v2.6.0) for creating jobs on Google Cloud Scheduler that have a HTTP target. Jobs are getting created, however, I am facing a couple of other issues:

  1. The HTTP target doesn't receive the X-Cloudscheduler-Scheduletime header which I am using to check the schedule execution time. If I create the job manually using the cloud console with the same HTTP target, I am getting that header in the request.
  2. Jobs created using python sdk cannot be updated. This is because the time_zone property is not being set properly for jobs created via python sdk. In the console, these jobs don't show any timezone and if I try to update any other property, it doesn't let me do it because it says 'time_zone' can't be left blank which is not true because scheduler jobs cannot be created without a timezone, so this is definitely an issue with the sdk.

I have seen another post with someone using nodejs sdk and facing the same problem. Their solution was to downgrade the sdk version to fix it but that doesnt seem to work with the python counterpart.

  • Please a reference to the Python SDK that you're using. A quick Google suggests that you can set [headers](https://googleapis.dev/python/cloudscheduler/latest/scheduler_v1/types.html?highlight=x%20cloudscheduler%20scheduletime#google.cloud.scheduler_v1.types.AppEngineHttpTarget.headers). It may (!?) be that this is what Console is doing. For Console you can open the browser's Developer Tools and look for what REST API calls are being made. If you're using `gcloud`, you can append `--log-http` to determine this. – DazWilkin Feb 09 '22 at 00:14
  • If you suspect issues with the SDK, then you should consider filing issues against the open-source repo [python-scheduler](https://github.com/googleapis/python-scheduler) or against Google's public [issuetracker](https://issuetracker.google.com) – DazWilkin Feb 09 '22 at 00:16

0 Answers0