Forum

Please note that you can subscribe to the individual forums. A subscription for news only covers the news.

[Closed] Season based jobs  


0

Hi Guys.

I am looking for inputs. I have a few jobs that are based on the season of the year. Like mowing the lawn and cleaning windows are not typical to do in the winter season. On the other hand there is not much possibility for snow in the summer.

The only way I found to deal whit this is by using If and IfNot statement in a procedure, and use those procedure to launch jobs.
As to my knowledge it is not possible to do directly in the [job] sections.  

Have you guys had the same challenges and if so how did you delt with them?

SwitchJJ

 
0

I must admit that I do it the low tech way: I change the script over the year. I simply outcomment jobs that are not relevant. 

Sven

 
0

Sven,

That is also a way to do it - thanks for you input.

Would it be an possible idea to be able to use flag in job in an furter update? Like If=December or notif=December

SwitchJJ

 
0

It's not possible. I would have to change the way jobs work completely. And there is a risk of confusion. For instance what if a job is scheduled in November to be run in December and it had an  NotIf=December?

 

 
0

I see you point.

But if you had this issue wouldn't that to be solved by some code?

Example 1:

[Job-SomethingThatShouldNotRunInDecember]
NotIf=December
Interval=14
AnnounceProcedure=checkmonth

[Procedure-checkmonth]
If=December
Some code that prevent the job to be announced

 

Exampel 2

[Job-SomethingThatShouldNotRunInDecember]
NotIf=December
Interval=14
BeforeProcedure=checkmonth

[Procedure-checkmonth]
If=December
MarkDone=Job-SomethingThatShouldNotRunInDecember]
Message=Job should not be done in december and will be canceled

 

SwitchJJ

 
0

You have an interval of 14 days. Meaning that the procedure checkmonth might run in November. As it is not December, it would run and the job must be done in December.

This is just one example of the conflicts that might occur.

I am closing the discussion here. 

Sven B.

 

 
  
Working

Please Login or Register