Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Kenneth Gravdal
2019-10-30T12:20:21Z
It would be usefull to be able to use a variable to set trigger interval
Usecase:

We fetch updates from a SQL database at given intervals:
SELECT [...]
FROM [...]
WHERE [...]
	AND 
		((UPDATED_TIME > sysdate - interval '5' minute))


By setting a job variable called "interval" (or anything else) with a value of 5, I am able to do this in my SQL:
[...] ((UPDATED_TIME > sysdate - interval ' {JOB(Active|Variable|interval)}' minute))


This is usefull since I also have a task where i use COUNT() to determine if there have been any changes (and use condition to stop rest of the job)

If I want to change the scoop of my SQL query to anything else than 5, I can simply update the value in the "interval" variable.

BUT: (Here comes the challenge) I also have to update the trigger to reflect my change in the SQL. Therefore could it be useful to have an third option in trigger (besides "Interval time trigger" and "Custom time trigger"). I suggest "Varable time trigger". The variable must be an integer and you may choose between seconds, minutes, hours and days for instance.
Sponsor
Forum information
Scroll to Top