Misc>SCHEDULED HTML PAGES
Caravan Business Server>Help>Misc>SCHEDULED HTML PAGES |
Syntax
|
<CARAVAN>schedule=(timespec=n1, n2, ...., n24 &....timespec=n1, n2...n24 & count=n)</CARAVAN>
|
Text
|
timespec : times specifications / time table in hour, minute, second, year, day, month, date. n1...n24 : are valid numbers for the respective timespec. hour : 1 to 24 minute : 0 to 59 month : jan to dec or 1 to 12. Only first three letters required. Feb and February are valid. day : sun to sat or 1 to 7. Only first three letters required. Sun and Sunday are valid. date : 1 to 31 year : greater than 0. 2000 is current and values added should be less than 100. count : can be any integer value and is optional
The Caravan Business Server automates administration and data processing tasks. Tasks, one or more lines of Caravan script, can be scheduled for one-time or repeated execution. The timetable for repeated execution can be elaborate and you can specify that the task should be executed monthly on a given day of a given week, or executed weekly on one or more days, or even executed every minute of every day.
Rules * At least one timespec should be specified in the schedule statement. * If count is specified, scheduled web page is executed only the specified number of times. * Schedule statement can be put anywhere in the web page. Only the first occurrence is valid, rest of the Schedule statements are ignored. * The web pages should be in the templates path. * The domain at run time is always admin for web pages containing schedule statements. * The output of the scheduled process is directed to tmp\\schedule.log * If you add a new schedule page, you must restart Caravan Business Server for the scheduling to become active. * Timespecs hierarchy is as follows: Year, Month, Date, Day, Hour and Minute. When a timespec is not specified, it is assumed to be valid for all valuesor for the lowest value, depending on whether the unspecified timespec is higher or lower in hierarchy compared to the specified values. * If only date is specified, then all values of year, month, day are valid and minute and hour is assumed to be 0. * Periodic scheduling is achieved by putting mulitple values. Maximum is 24.
|
Sample
|
Examples To execute the web page 10 minutes past every hour. Say, 12.10, 1.10, 2.10 and so on. <CARAVAN> schedule=(minute=10) </CARAVAN>
To execute theweb page every minute. <CARAVAN> schedule=(minute=all) </CARAVAN>
To execute the web page 10,20,30,40,50 and 0 minutes past every hour.
<CARAVAN> schedule=(minute=10,20,30,40,50,0) </CARAVAN>
To execute the web page 10,20,30,40,50 and 0 minutes past every hour on Wednesdays. <CARAVAN> schedule(minute=10,20,30,40,50,0&day=wed) </CARAVAN>
To execute the web page 10,20,30,40,50 and 0 minutes past every hour on Wednesdays in March. <CARAVAN>schedule(month=march&minute=10,20,30,40,50,0&day=wed)</CARAVAN>
To execute the web page every Friday the 13th at 0:0:0 hours <CARAVAN> schedule(day=fri&date=13) </CARAVAN> Examples The three different schedule statements will execute the web page on the 1st of every month. Though all the statements are the same in effect, the first one is the simplest.
<CARAVAN>schedule=(date=1)</CARAVAN>
<CARAVAN>schedule=(month=jan, feb, mar, apr, may, june, jul, august, sept, oct, nov, dec)</CARAVAN>
<CARAVAN>schedule=(month=jan, feb, mar, apr, may, june, jul, august.sept, oct, nov, dec&date=1)</CARAVAN>
|
Quick Reference
|
* To prevent unauthorized access to the web page, add the following statement at the top of the page: <CARAVAN>domain admin</CARAVAN> * The scheduled web pages can also be executed manually from the browser. * To execute scheduled pages only once at startup use schedule=(minute=all&count=1)
|
Back
|
|