Implementing Scheduled workflow for deleting a thing

iam trying to set up a scheduled workflow for deleting a thing after a certain criteria is met. the process is simple, if the expiry date is less than the current date/time i want the workflow to delete the related record from a ‘x’ data type. how do i create something like this it make it run at certain intervals specified by me

also iam concerned about the workload units related to this whole workflow thing. can someone break it down

Just schedule the workflow to run at the expiry date.

Or, if you don’t need it to be so accurate, do a regular check (i.e. daily, twice-daily, hourly etc.) and delete all things who’s expiry date has passed.

This can cost more in terms of the WUs for the searches that need to take place at regular intervals, but can be less costly in terms of WUs to delete the things as you could take the entire list and run a backend workflow on a list

This is less costly in terms of search as there is no search, but can be more expensive because each individual thing will have the schedule backend workflow cost of running the action to schedule (0.6) and the adding to scheduler cost of (0.1) plus the cost to do the delete action of (0.6).

@peanut_butter run some tests on both approaches to get a baseline of the cost difference if you do 10 things at once versus 10 things individually…you might just find the regular check approach is less costly if there are many things found on each check.

1 Like

Got it. Thanks