sopra-fs24-group-01 / sopra-fs24-plantparent-server

This is the Spring-based back end for the PlantParent website.
Apache License 2.0
0 stars 1 forks source link

Configure GCP cloud scheduler #53

Closed M-Sigg closed 5 months ago

NorDar commented 5 months ago

GCP Cloud scheduler created here: https://console.cloud.google.com/cloudscheduler/jobs/edit/europe-west6/trigger-daily-watering-check?project=sopra-fs24-group-01-server

CRON schedule: 0 8 * POST to https://api.plantparent.ch/checkAllWatering

Test from browser and manual cloud scheduler run: gcloud app logs tail

Via Browser (Not supported)

2024-04-24 16:42:20 default[v1]  "GET /checkAllWatering HTTP/1.1" 405
2024-04-24 16:42:20 default[v1]  2024-04-24 16:42:20.600  WARN 11 --- [nio-8080-exec-7] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported]

Via Cloud Scheduler:

2024-04-24 16:42:41 default[v1]  "POST /checkAllWatering HTTP/1.1" 200
2024-04-24 16:43:36 default[v1]  "POST /checkAllWatering HTTP/1.1" 200