1

It is possible that on Azure functions beta the timer has a bug or did I something wrong?

My cron timer in the application settings was this:

59 23 * * * * 

and the last run was on 2018-02-21T17:23:59.0307645+00:00

How should I set the cron timer if I want to have every day at 23:59?

2 Answers 2

5

The expression you currently have (59 23 * * * *) means "every hour at 23 minutes and 59 seconds). What you need to use instead is 0 59 23 * * *. Note that by default, this will be treated as UTC time.

Be aware that CRON expressions have lots of dialects, and I don't think the other answer will work. My answer is specifically for Azure Functions, which uses ncrontab (the flavor of it that supports the 'seconds' field).

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

1 Comment

I will try this tonight but i think this would fix my problem. i'll let you know
0

Everyday at 23:59: 0 59 23 1/1 * ? *

Source

8 Comments

Strang because the documentation points on this side en.wikipedia.org/wiki/Cron#CRON_expression and if I understand right the first thing are the minutes. Or I am wrong?
If I use your expression -> 59 23 * * * * on the site I linked, it states that the expression is invalid. I don't know much about it, theoretically, per say, althought I've worked with it quite a lot in the past, but I've always used CronMaker, to generate/check my expressions. If I find something relevant to your question, I'll update my answer.
Note the "CronMaker uses Quartz open source scheduler. Generated expressions are based on Quartz cron format."
@cpiock did you get that wikipedia article by following microsoft's tutorial on creating Azure functions that are triggered by a timer? If so, take a closer look at the example. The expressions they use there, have seconds first. (0 */1 * * * * -> for every minute + 0 0 */1 * * * -> for every hour).
@cpiock Thats the doc I mentioned. If you check the examples, they use seconds first and not, minutes first, as stated in the wikipedia article.
|

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.