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.


apassy
2008-10-31T21:57:37Z
OK - This is more of How do I?

We have a DB table that tracks the completion status of various process (many non-VC).

I want to trigger a task when the time in a particular field is current (within the last 5 minutes).

Can someone help me?
Sponsor
Forum information
Support
2008-10-31T22:02:31Z
1. create a job
2. Add a time trigger that runs every minute for example
3. Create a SQL Task that does the query
4. Create a second Task which does what you want to do
5. Create a condition on the second Task compares the output of the first Task

The tricky part is 5 because I am not sure how the field looks exactly.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
apassy
2008-11-03T15:25:43Z
The tricky part is part 5. The output is a date & Time, and I can format it how I want, but I'm having a tough time on the condition. I want the task to trigger when the time output of the sql is within 5 minutes of right now. How might I do that?

BTW, thanks for all the help.
PeterW
2008-11-03T16:15:06Z
There isn't a trigger that "watches" a DB field. Your best option is to do the 5 steps listed. My suggestion would be to create a program that pulls the date/time field from the DB and then compare it inside the program. If the date/time is more than 5 minutes ago then return -1 (fail). Otherwise return 1 (success). As suggested by Henrik you can have a conditional on the second task that looks at the previous step. If it fails (returns -1) then exit the job and do not perform the second task which has the steps you would like done if it was within 5 minutes.
apassy
2008-11-03T17:09:58Z
Actually, you gave me an idea- I'll do the test in the SQL and just return a specific value if true.

Thanks.
Scroll to Top