Service Desk Practitioners Forum
cancel

Scheduled rules question?

SOLVED
Go to solution
Highlighted
Peter Dent
Outstanding Contributor.

Scheduled rules question?

I'm running SD4.5 with SP17, (in case you don't know by now...lol).

I may have asked this question before and forgotten the answer, my apologies...

I have a DB rule in which "schedule the validation of tis condition" is used. This allows you to schedule things to run in the future.

The question is in two parts:

1. Is the rule condition evaluated at the scheduled time or is the rule conditions evaluated now and the execution of the rule scheduled for later?

2. The rule is based on a date field on the form. If I set the date on the form, the rule runs and is scheduled for a date in the future. If I then change the date on the form or even delete it altogether, will the scheduled task be changed accordinly or be removed if the date is deleted?

Thanks
7 REPLIES
George M. Meneg
Acclaimed Contributor.

Re: Scheduled rules question?

Hello Peter,

1. Only the condition with "Schedule the validation of this condition at:" checked is scheduled. You can schedule only one condition per db rule.

2. When the schedule rule is created the current value of the date field is inserted in the db. Changing the value of the date field won't have an impact on scheduled tasks.
menes fhtagn
Ruth Porter
Acclaimed Contributor.
Solution

Re: Scheduled rules question?

Hi Peter,

"1. Is the rule condition evaluated at the scheduled time or is the rule conditions evaluated now and the execution of the rule scheduled for later?"

The SCHEDULED condition is the task that is run in the future: so any non-scheduled conditions are run at the point the DB rule is evaluated and if those are true a scheduled task is set up to check the scheduled condition at the time you specify.

"2. The rule is based on a date field on the form. If I set the date on the form, the rule runs and is scheduled for a date in the future. If I then change the date on the form or even delete it altogether, will the scheduled task be changed accordinly or be removed if the date is deleted?"

The checkbox "Only execute once" comes in here: if you check this box and the date field at which it is scheduled is altered, then the scheduled task is amended to use the new value (it may actually delete and creat another but the effect is the same). If the box is clear, then another sched task is set up for the new value.

Not sure about deleting the date - you could experiment but if the date is in the past 4.5 does not sched a task (unlike 5 where this can cause issues)

Hope this essay contains something of use!
Regards, Ruth
http://www.teamultra.net
aaron afilalo
Respected Contributor.

Re: Scheduled rules question?

Just to piggy-back on ruth's answer - I have attached a page from an HP SD admin course.

Peter Dent
Outstanding Contributor.

Re: Scheduled rules question?

George, thanks for that, much appreciated.

Ruth, I like a good essay, very informative, thanks, just what I wanted to know. I'll experiment with deleting the date altogether.

Aaron, which admin course was that from? When did you atend? I have the books from the course I went on but they only go as far as section 11!

Thanks all.
aaron afilalo
Respected Contributor.

Re: Scheduled rules question?

Peter,

Course info:
HP SD 4.5 - Admin
H7084 D.00
5 days in length.
It has 30 modules I believe.

But I think that for the most part these forums showcase people who know a lot more than what was presented in this course.

Aaron
Ken Briscoe
Acclaimed Contributor.

Re: Scheduled rules question?

Hi Peter - I hate to disagree with guru George (and possibly Ruth), but tests I've just completed prove that ALL conditions are re-evaluated when the scheduled task executes, not just the one that has the schedule. (That might be what Ruth was saying...not sure). Sorry it took so long. I did these because I had a problem, and my understanding of how they worked was quite different to the early replies.
This is under SP20.
FYI I've attached a copy of the tests and results so anyone can replicate.
CHeers.....Ken.
My email is kenilian@bigpond.com.au
Oscar U Diaz
Respected Contributor.

Re: Scheduled rules question?

Hello,

1 .- The rule was evaluated in time, that is, if you tell it what is evaluating 1 day after registered, placing a task and then pass 1 days (24 hours) is scheduled task evaluates if the condition is correct or not, depending on whether or not it will execute the action.

2 .- No, once the task is scheduled, we can not prevent the run, remember all post about how to eliminate scheduled tasks.