Help:Processing:Jobs

From Opadeez Wiki
Jump to navigationJump to search

Jobs are used to automatically trigger certain processes. There are currently 2 types of jobs supported:

  • File watcher: this is used to automatically process a file when it is dropped into a given folder. Opadeez support CSV and hierarchical CSV format, in line with the DataSet definition associated with the Flow used to execute the job. Below is an example of hierarchical CSV file:

 Customer,CUST0001,John,Doe
 Order,ORD0001,USD 2500,Product-0001
 Order,ORD0002,USD 18360,Product-0002
 Customer,CUST0002,Johnny,Smith
 Order,ORD0003,USD 14460,Product-0003
 Order,ORD0004,USD 906,Product-0002
  • Scheduler: Schedulers are used to trigger a process at certain interval. For example this can be used to check for inbound emails coming from a customer.

Jobs

General properties

Job name Name of the Job. Name must be unique.
Job type Type of job. Accepted values are File watcher and Scheduler
Run on When deploying the solution in 3-tiers, the Web server and Application server are separated.
  • Server side: The job will be executed by the Application server
  • Web Server side: The job will be executed by the Web application
Flow The flow to be executed by the Job.
  • For File watcher job, this flow will be executed for each group or record found in the file (in above example, this means that the flow will be executed for customer "John Doe" and separately for customer "Johnny Smith").
  • For Scheduler job, this flow will be executed only once every time the scheduler is triggered.

File watcher properties

Loop Delay (ms) The file watcher will check for new files every Loop Delay ms. For example you can use value 1,000 so the File Watcher will check for new files every second.
Input path Path to the folder where the input files are dropped.
File pattern (reg exp) A regular expression for the input files that need to be processed. For example to process any file with a name ending with .csv use: .*\.csv
Record delimiter Record delimiter in the file. Typically CSV use carriage return as a record delimiter, in which case you should enter: \n
Field delimiter For each record, delimiter used to separate fields. If using a "comma", enter value as ,. If using a tabulation character, enter the value as: \t
Processed path Processed file will be moved to this folder.
Error path Each record which triggered an error during the process will be saved in a file stored in this folder.
Ignore records Number of lines to be ignored from the input file. For example if your CSV file has a header line, key in value: 1

Scheduler properties

If you are familiar with cron tables, Opadeez scheduler follows the same principles. You can define at which specific minute (of each hour), hour (of each day), day of the month, month and day of the week the scheduler runs. Here are some examples:

To trigger a scheduler every minute

Minutes <blank>
Hours <blank>
Day of month <blank>
Month <blank>
Day of week <blank>

To trigger a scheduler every hour at 00:00, 01:00 etc...

Minutes 0
Hours <blank>
Day of month <blank>
Month <blank>
Day of week <blank>

To trigger a scheduler once a day at 07:00 AM

Minutes 0
Hours 7
Day of month <blank>
Month <blank>
Day of week <blank>

To trigger a scheduler every Sunday at 07:00 AM

Minutes 0
Hours 7
Day of month <blank>
Month <blank>
Day of week Sunday

See also