 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
liangzhu
Joined: 30 Nov 2011 Posts: 42 Country: Singapore |
|
the isholiday function |
|
Hi, is there anything i should be wary about when using the isholiday function in JAL? e.g. does it make any difference who is logged in when running in GUI mode, pertaining to the isholiday function?
i have 2 machines. machine 1 is xp, always has 1 admin user all the time. machine 2 is windows server 2003, has multiple users. both instances of 24x7 are running in gui mode. i saved the .dat from machine 2 , opened it in machine 1, to test. and both machines have holidays setup by going through the GUI and adding it from there. i opened the holidays.txt in machine 2, and since 12/26/2011 was also there, i assumed 1/3/2012 is the correct data format, at least in 24x7.
the test was whether the jobs will handle the 2nd jan public holiday successfully.
when i run it on machine 1 , it returned(these are the logs in performance data):
job 233
**** 1/3/2012 11:57:32 ****
1: DIM
1: Executing DIM("THISDAY", "DATE")
2: DIM
2: Executing DIM("IS_HOLIDAY", "BOOLEAN")
4: TODAY
4: Executing TODAY("1/1/1900")
Return "1/3/2012"
5: DATEADD
5: Executing DATEADD("1/3/2012", "-1", "1/3/2012")
Return "1/2/2012"
6: ISHOLIDAY
6: Executing ISHOLIDAY("1/2/2012", "false")
Return "true"
7: IF
7: Executing IF("true", "DONTRUN", "RUNTODAY")
**** 1/3/2012 11:57:32 ****
1: DIM
1: Executing DIM("THISDAY", "DATE")
2: DIM
2: Executing DIM("IS_HOLIDAY", "BOOLEAN")
4: TODAY
4: Executing TODAY("1/1/1900")
Return "1/3/2012"
5: DATEADD
5: Executing DATEADD("1/3/2012", "-1", "1/3/2012")
Return "1/2/2012"
6: ISHOLIDAY
6: Executing ISHOLIDAY("1/2/2012", "false")
Return "true"
7: IF
7: Executing IF("true", "DONTRUN", "RUNTODAY")
when i run it on machine 2, it returned:
job id 266
**** 1/3/2012 02:00:40 ****
1: DIM
1: Executing DIM("THISDAY", "DATE")
2: DIM
2: Executing DIM("IS_HOLIDAY", "BOOLEAN")
4: TODAY
4: Executing TODAY("1/1/1900")
Return "1/3/2012"
5: DATEADD
5: Executing DATEADD("1/3/2012", "-1", "1/3/2012")
Return "1/2/2012"
6: ISHOLIDAY
6: Executing ISHOLIDAY("1/2/2012", "false")
Return "false"
7: IF
7: Executing IF("false", "DONTRUN", "RUNTODAY")
10: DAILYJOB
10: Executing DAILYJOB("weekly-2300.txt")
job 264
**** 1/3/2012 02:01:20 ****
1: DIM
1: Executing DIM("THISDAY", "DATE")
2: DIM
2: Executing DIM("IS_HOLIDAY", "BOOLEAN")
4: TODAY
4: Executing TODAY("1/1/1900")
Return "1/3/2012"
5: DATEADD
5: Executing DATEADD("1/3/2012", "-1", "1/3/2012")
Return "1/2/2012"
6: ISHOLIDAY
6: Executing ISHOLIDAY("1/2/2012", "false")
Return "false"
7: IF
7: Executing IF("false", "DONTRUN", "RUNTODAY")
10: DAILYJOB
10: Executing DAILYJOB("daily2-0130.txt")
job 259
**** 1/3/2012 02:01:33 ****
1: DIM
1: Executing DIM("THISDAY", "DATE")
2: DIM
2: Executing DIM("IS_HOLIDAY", "BOOLEAN")
4: TODAY
4: Executing TODAY("1/1/1900")
Return "1/3/2012"
5: DATEADD
5: Executing DATEADD("1/3/2012", "-1", "1/3/2012")
Return "1/2/2012"
6: ISHOLIDAY
6: Executing ISHOLIDAY("1/2/2012", "false")
Return "false"
7: IF
7: Executing IF("false", "DONTRUN", "RUNTODAY")
10: DAILYJOB
10: Executing DAILYJOB("daily2-0200.txt")
job 254
34: Executing IFTHEN("true", "CHECKMONHOL1")
38: FORMAT
38: Executing FORMAT("1/3/2012", "ddd", "Tue")
Return "Tue"
39: DATEADD
39: Executing DATEADD("1/3/2012", "-1", "1/1/1900")
Return "1/2/2012"
40: ISHOLIDAY
40: Executing ISHOLIDAY("1/2/2012", "false")
Return "false"
job 245
**** 1/3/2012 02:07:20 ****
1: DIM
1: Executing DIM("THISDAY", "DATE")
2: DIM
2: Executing DIM("IS_HOLIDAY", "BOOLEAN")
4: TODAY
4: Executing TODAY("1/1/1900")
Return "1/3/2012"
5: DATEADD
5: Executing DATEADD("1/3/2012", "-1", "1/3/2012")
Return "1/2/2012"
6: ISHOLIDAY
6: Executing ISHOLIDAY("1/2/2012", "false")
Return "false"
7: IF
7: Executing IF("false", "DONTRUN", "RUNTODAY")
10: DAILYJOB
10: Executing DAILYJOB("daily-2330.txt")
|
|
Tue Jan 03, 2012 9:49 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
Hi,
IsHoliday function in JAL checks content of holidays.txt file and returns TRUE if the specified date is found. It is user agnostic when the scheduler is running as a Windows service or running "in Run as Administrator" mode. Otherwise, the content of the file is user specific (Windows file virtualization) and so the results of the function can vary for different users.
|
|
Wed Jan 04, 2012 10:57 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|