0

Can we schedule normal Python scripts using Google App Engine? Or can it only be used to schedule webapps?

Problem - I have a couple of Python scripts running in Google Compute Engine and want to schedule them using the cron service in Google App Engine.

1
  • I used for a similar situation this pattern. cloud.google.com/solutions/… think should be useful for your use case. But you need pub/sub in the middle. Commented May 30, 2017 at 21:43

1 Answer 1

0

The GAE cron is fundamentally just a scheduler for HTTP GET requests:

A cron job invokes a URL, using an HTTP GET request, at a given time of day. A cron job request is subject to the same limits as those for push task queues.

A cron job will invoke a URL, using an HTTP GET request, at a given time of day. An HTTP request invoked by cron can run for up to 60 minutes, but is subject to the same limits as other HTTP requests.

You cannot directly invoke plain/regular python scripts from the GAE cron itself, see Google cloud app.yaml cron.yaml for python script not working but no log.

But you can invoke such scripts from inside a valid GAE cron handler (if they meet the respective GAE restrictions). The scripts would be running on GAE, though technically flexible environment GAE is really GCE under the hood.

If you want to keep the scripts running on GCE as they are now you'd need a way to trigger them from GAE.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.