I saw that Firebase recently launched a way to schedule Cloud Function at regular intervals. I have been using an online crob job scheduler and currently migrating those jobs over to Firebase Cloud Function. I want to run the Cloud Function every 30 minutes at the start of every hour and then 30 minutes. So, say I deploy the function at 1:45 PM. Then the Cloud Function should run at 2:00 PM, 2:30 PM, 3:00 PM and so on.
I tried using the schedule('every 30 minutes')
but this runs the Cloud Function after 30 minutes from the time it is deployed.
Is there a way to specify the schedule such that it runs as described above?
this should work like charm.
export myCronFn =
functions.pubsub.schedule('0,30 0-23 * * *').onRun((context) => {
//
})
source: https://crontab.guru/#0,30_0-23___*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With