Cilvic
Cilvic

Reputation: 3447

How to best run function every x seconds on Google App Engine Python

Using Google App Engine Python 2.7 I want to create job that checks every 10-60s whether heart-beat events where received from all clients. If not an (email) alert is triggered.

The basic alternatives I can imagine are:

I found this question but was hoping for a more precise answer: how-can-i-do-the-same-thing-over-and-over-every-1-4-seconds-in-google-app-engine

The reason I want to check that frequently is that an alert needs to be triggered if no update is received for a while.

Upvotes: 2

Views: 724

Answers (1)

Bemmu
Bemmu

Reputation: 18247

You could start a cron job that runs every minute. Then in the cron job, do your heartbeat check, sleep for a while, check again, sleep ...

Upvotes: 1

Related Questions