Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

...

  • If you want to use date values in order paramters then you

...

  • could add an

...

  • initial job

...

  • to the begin of your job chain. 

  • This job

...

  • would calculate some date variables

...

  • as hour, month or year and

...

  • set the order parameters

...

  • accordingly.

Configuration for Initialization Job

Image Added

 

 

Image Added

 

 

Image Added

 

Source for Initialization Job

...

Code Block
languagehtml/xml
titleInitialization Job
collapsetrue
 <job  order="yes" stop_on_error="no" name="init">
     <script  language="javax.script:rhino">
         <![CDATA[
 function spooler_process(){
    var today = new Date ();
 
    var month = today.getMonth()+1; 
    var fullYear = today.getFullYear(); 
    var day = today.getDate();
    var dayOfWeek = today.getDay();   
    var hour = today.getHours();
    var minutes = today.getMinutes();
    var seconds = today.getSeconds();
 
    var lastMonthDate = new Date();
    lastMonthDate.setMonth(lastMonthDate.getMonth()-1);
    var lastMonth = lastMonthDate.getMonth()+1; 
    var lastFullYear = lastMonthDate.getFullYear(); 
    var lastDay = lastMonthDate.getDate();
    var lastDayOfWeek = lastMonthDate.getDay();   
 
    var order = spooler_task.order();
 
    order.params().set_var("month",month);
    order.params().set_var("fullYear",fullYear);
    order.params().set_var("day",day);
    order.params().set_var("dayOfWeek",dayOfWeek);
    order.params().set_var("hour",hour);
    order.params().set_var("minutes",minutes);
    order.params().set_var("seconds",seconds);
 
    order.params().set_var("lastMonth",lastMonth);
    order.params().set_var("lastFullYear",lastFullYear);
    order.params().set_var("day",day);
    order.params().set_var("dayOfWeek",dayOfWeek);
    order.params().set_var("lastDay",lastDay);
    order.params().set_var("lastDayOfWeek",lastDayOfWeek);
  
 	return true;
 }
         ]]>
     </script>

     <run_time />
 </job>

Image Removed

Image Removed

...

Related Downloads