question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

updating timer trigger did not properly reschedule the job

See original GitHub issue

Hi,

I have a job that runs weekly and processes payments. I typically have this job run on Tuesday at 9am UTC, but I had some fixes that I needed to push out and decided to delay it by a day. To do this, I used the debug console in Azure portal to open the function.json file in the online editor and changed Tue to Wed. Here’s the resulting file:

{
  "bindings": [
      {
          "type": "timerTrigger",
          "name": "timerInfo",
          "direction": "in",
          "schedule": "0 0 9 * * Wed",
          "runOnStartup": false
      }
  ]
}

To my surprise, I woke up this morning to find that the job had run.

To further complicate things, I’m seeing the following output from the functions dashboard:

image

Related information

Provide any related information

  • Running Node.js
  • Functions runtime v1.0.10690

Update

I just did a test to see if the job “appears” to reload when changing the file and according to the logs, I do see that the functions runtime stopped and then restarted. I’m assuming that this is the job reloading.

Is there something with the way these timer triggers are scheduled that would have caused the previously scheduled job to remain even though I had updated function.json to a new schedule?

Thanks again

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
brettsamcommented, Mar 7, 2017

I’ve just committed a change for your initial issue (the timer firing when you changed the schedule): https://github.com/Azure/azure-webjobs-sdk-extensions/pull/195.

I’m going to close this issue – but if you’re able to find any more logs that indicate what may have happened with the staging/prod issues, please open a new issue and we’ll tackle it there. My current theory:

  • Your staging environment still had the old schedule, so it ran.
  • When your schedule changed, we incorrectly ran your function immediately (which is the fix above). Somewhere in the middle of processing, your function died, leaving your backend data in an unexpected state.
  • That doesn’t explain why your staging environment didn’t show that the timer had fired in the dashboard, though… that’s what still confuses me.
0reactions
jamesdixoncommented, Apr 18, 2017

@brettsam sorry I never replied to this. I appreciate you submitting the fix.

A quick question: if I manually run the job, will it affect the scheduling of future jobs? I’m asking because our job didn’t fully complete when it ran on its normal schedule last night. It was an error in our code, but I need to run it again. However, I’m a bit gun shy to run it manually as I’m afraid of affecting the future schedule.

Thanks! James

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Timer Trigger not firing - Microsoft Q&A
Strange behavior. Azure trigger on 15min cron schedule fires reliably every 15min for hours, then stops working until I login to portal, ...
Read more >
azure - Function App Time trigger not working
I got a conclusion out of the Issue, Although you will update the Time trigger schedule in the Code level, this will not...
Read more >
Workato triggers
SUMMARY. Triggers initiate recipe actions in Workato. Triggers follow in-sequence delivery, maintain processed jobs records, prevent duplicate processing, ...
Read more >
Function Trigger Syncing - Ken Muse
The moment you leave the portal, the Timer Trigger stops functioning. Perhaps the Function stops responding to change events from storage ...
Read more >
Azure Timer Trigger Function - Change via code : r/AZURE
The issue with updating the cron expression (which you can do via config) is that your app reboots when you do it and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found