I’m looking at creating some backend events that are triggered by database updates, I only want it to run if there have been changes, but I also don’t want it to run any more than once every 24hrs.
While running it every time there is a change to the particular tables I’m looking at is possible, as users would be making hundredas of changes in a day, I imagine this would chew up WUs unnecessarily.
Does anyone have any tips on how to set this up, or am I beinging unnecessarily concerned about WUs?
Have a dateUpdated field and have a condition on the trigger such that the trigger only runs when dateUpdated < Current date/time +days -1. When you run the trigger (i.e its more than 24 hours), modify the dateUpdated field to be Current date/time.
Will each of the hundreds of changes that dont satisfy the condition (once an update has been made today) take up WUs?
@SJL is there any reason not to run a WF every 24hrs?
0.05 WU per trigger trivial
Plus grabbing the config date.
Not saying its a issue but 100s per customer per day… especially if his entire goal is to simply run 1x a day.
There won’t be changes every day, but when there are changes, there will be lots. So running every 24 hrs is unnecessary, but if a change is made in any block of 24hr, then I will want to execute the workflow
Sounds like this might be the way to go - I was hoping to avoid another field just to track this, but it makes sense to have it
You can just run a WF every 24 hrs to see if any changes have been made in last 24 hours. If there are, make the necessary changes. If not…
This will avoid a field to track it (which really isn’t a big deal and any proper setup will likely need a config table) and perhaps cut down on WU.
Thanks, that sounds like a great way to do it!
I may also just be getting too hung up about WUs