How to set runtime frequency to 36 hours for Azure Timer Trigger Function App - timer

I am trying to run the function app every 36 hours from the last time it was triggered. What Cron setting is required to support this? It looks like we can only set hours from 0-23.

Yes, the hours range is between 0 to 23.
If it is 36 hours means, 1 day + remaining hours (n) should be given.
If the CRON expression is written like (0 24 * * *), it will not allow:
You can set the CRON Expression (0 */36 * * *) for every 36 hours in the Azure Functions Timer Trigger.
CRON Expression Editor Link

Related

How to make gcp schedule execute tasks at a specific time every hour?

How to set schedule as "every 1 minutes from every hours from HH:10 to HH:15"?
I want the task to be executed at a specific time every hour, but gcp doesn't seem to support it.
In a nutshell,I want to execute the task 5 times per hour.
https://cloud.google.com/appengine/docs/standard/python/config/cronref
"every 1 minutes from every hours from HH:10 to HH:15" not working.
"5 times per hour" would essentially mean every 12 minutes. Try:
schedule: every 12 minutes
If you are using Cloud Scheduler, you can specify a cron:
*/12 * * * *
For running its every 11-15th every hour being 10-15 hours, try using the cron:
11-15 10-15 * * *

How can I make an Azure Logic App only execute during a certain window of time?

I've got a logic app that runs every 15 minutes. I'd like to make it only run every 15 minutes between the hours of 8 AM and 4 PM, but I'm unable to figure out how to go about that.
My understanding thus far is that I can't add that condition to the Recurrence, which is set to 15 minutes, and that I'll probably have to make it so that every 15 minutes, if time is between 8 AM and 4 PM, do x... but I'm still struggling to figure out if I ought to be using the "Get current time" feature and using a conditional comparator - if this is the case, how do I make the comparison?
Thanks in advance!
I think you achieve it in using Recurrence trigger itself. As shown below I have it for every 5 minutes on Monday to Friday between 8 am to 7 pm
You can also go through this documentation for any additional details

Cron Script to execute a job every 14 days from a given date in specific time zone

I want to execute a Job in CRON for every 14 days from a specific date and timezone.
As an e.g. from JUNE 24TH every 14 days in CST time zone.
Run job every fortnight
The easy way
The easiest way to do this is simply to create the task to run every 14 days from when you want it to first run like:
CREATE TASK mytask_fortnightly
WAREHOUSE = general
SCHEDULE = '20160 MINUTE'
AS
SELECT 'Hello world'
How it works
As there are 60 minutes in an hour, 24 hours in a day and 14 days in a fortnight, ergo that's 20,160 minutes.
Caveat
The above solution does not run the task every fortnight from a given date/time, but rather every fortnight from when the task is created.
Even though this is the simplest method, it does require you to be nominally present to create the task at the exact desired next scheduled time.
As a workaround however, you can create a one-shot task to do that for you the very first time at the exact correct date/time. This means you don't have to remember to be awake / alert / present to do it manually yourself, and you can clean up the creation task afterwards.
The harder way.
Other solutions will require you to create a task which gets run every Thursday (since 2021-06-24 is/was a Thursday, each subsequent Thursday will either be the off-week, or the fortnight week)
e.g. SCHEDULE = 'USING CRON 0 0 * * THU'
Then you will add specific logic to it to determine which one the correct fortnight is.
Using this method will also incur execution cost for the off-week as well to determine if it's the correct week.
Javascript SP
In javascript you can determine if it's the correct week or not by subtracting the start date from the current date and if it's not a mutiple of 14 days, use this as a conditional to short circuit the SP.
const deltaMs = (new Date) - (new Date('2021-06-24'));
const deltaDays = ~~(deltaMs / 86400000);
const run = deltaDays % 14 === 0;
if (!run) return;
// ... continue to do what you want.
SQL
You can also check if it's a fortnight using the following SQL condition in a WHERE clause, or IFF / CASE functions.
DATEDIFF('day', '2021-06-24', CURRENT_DATE) % 14 = 0

How to Schedule days and hours for every two minutes trigger in Azure Logic app?

Every two mins it should get a trigger for 3 hours.
Run the logic app every day at 9 am?
The above logic app triggers and runs for every 2 min.
how to set timing(3hrs) and for each day(every day) at 9 am?
eg: 10 Sep 2020 at 9 am to 12 should run, every 2 min trigger and finishs the task.
You should change Frequency From Minute to Day, then cilk Add new parameter to add At these hours and At these minutes.
Because At these minutes cannot use cron expressions, you can only follow the format of 0,2,4,6.....58 to make it execute every two minutes.
If you have any other questions, please let me know.

Backend instance hours count

I'm using the AppEngine's Backend instances and the daily free quota is 9 instance hours. However, I've been using a Backend with 10 instances for around 16-17 minutes and my usage has already crossed 66%.
The calculation I had in my mind was 17 mins * 10 instances = 170 mins ~ 2.8hrs which is definitely less than 66% of 9 hours.
Can someone explain me the billing scheme here?
From https://developers.google.com/appengine/docs/quotas#Requests:
Instance Hours (billable) In general, instance usage is billed on an
hourly basis based on the instance's uptime. Billing begins when the
instance starts and ends fifteen minutes after the instance shuts
down. You will be billed only for idle instances up to the number of
maximum idle instances set in the Performance Settings tab of the
Admin Console. Runtime overhead is counted against the instance
memory.
In your case, you'd have 17min of activity + 15min after activity = 32 minutes. So 320 minutes (32 * 10) is pretty close to 2/3 of 9 hours.
You should be able to see the details in the Usage History of your application.

Resources