Executing Scheduled Tasks with Parameters

Not sure if this is already possible in some way, but I’d love to be able to have scheduled tasks with an extra parameters option

Obviously could only do some basic options, like strings and ints. But I’d rather have 1 background function that gets executed with different parameters instead of needing multiple different functions

I could be completely offbase and this isn’t possible at all, or I’m overlooking basic functionality

1 Like

I am proboably missunderstanding your request but what I do in a situtation where I need to change the behavior of a scheduled task is to us a datatable as sort of config for the background task.

e.g. I have a nightly background task that calculates monthly reports for the last two months.
When I want it to recalculate all months back (in case of an update for example) I have a flag in the datatable ‘recalculate all’ which the background task checks.

In a nutshell - you can simply use a datatable as ‘parameter’ to your sheduled tasks.

Cheers, Mark

2 Likes

So essentially what I’m doing is pulling data from an outside source, the parameter defined in the function determines what that source is. Currently we just iterate over the few dozen possible different sources, and pull the data every time, but I actually only need to update from a few sources. I could theoretically write different functions for each, but being able to parameterize the Scheduled tasks means I can only execute what I need, when I need it. Having it done through Schedules Tasks in that way would mean the less tech savvy on the team could set it up