Skip to content

Scheduling a Database Task to run on a dynamic date (like the end of an accounting-period quarter) rather than a fixed calendar date is tricky since those period-end dates shift from year to year — is there a way to drive the schedule off business logic instead of a fixed date/interval expression?

Answer

Yes — create a Function inside a custom PL/SQL Package that calculates and returns the next desired execution date dynamically (for example, by looking up the actual accounting-period calendar in the database), with the function returning a Date type. When configuring the Scheduled Task, select the 'Custom' scheduling option and reference that Function there instead of a fixed date or interval expression — the task then re-evaluates the function each time to determine its next run date, correctly following a business calendar that changes year to year rather than a static schedule.

← Browse Workflows and automation questions