Still relatively new to VC.
Is it possible to add a trigger to a job that will cause it to re-run itself until a condition is met?
I have a job that sends one email at a time based on sql data. The first task gets a particular key, the next gets the email address associated with that key, the next builds the email body, the next sends the mail... each of the results go into the email task as variables. The final task updates the database to note that the email was sent for that key, making it ineligible for selection on next run.
(subquestion: within VC, is there a better way to do this when there might be many emails to send? I could do with SSIS and have VC trigger the job, and might do that, but it's easier for maintenance if it stays in VC).
The main problem with this is the trigger. I don't want to trigger this job to check for new data every 20 seconds. New data only comes up a few times a day. But sometimes it gets backed up -- dozens or possibly hundreds of emails need to go out, and each one goes with a single time trigger click, one every 2 minutes. OK, this is silly.
I'd love to have it check every two minutes, and, if the job ran through, start over! Keep running! Then, when the result of the first task is 0, quit and wait for the next time click to keep checking.
Suggestions?