Successfully!

Error!

You are viewing 10.0 help doc. More details are displayed in the latest help doc

Task Schedule Setting

I. Overview

1) For the basic introduction and operation method of task schedule, please refer to: Timing schedule introduction.

2) There are four steps when setting a task schedule, as shown in the figure below. This article introduces the four steps in details.      

1.png

You will learn
  • Add a Task

  • Basic Settings

    • Task name

    • Default user group

  • Dispatcher Object

    • Report template

    • No dispatcher object

  • Scheduling Cycle

    • Start time: set the start time of a task

    • Execution frequency

  • File Processing

    • Report template

    • No dispatcher object

  • Precautions

    • Parameters supported

    • Name of parameters unsupported

II. Add a Task

Log in to the Decision-making Platform as an administrator. Click [Manage]>[Task Schedule]>[Add a Task] to add a scheduled task, as shown below:

Note: If a normal user intends to set a scheduled task, then the administrator needs to enable the [Hierarchical Authorization], to assign the [View] permission on the [Task Schedule] page for the normal user. For detailed steps, please refer to Hierarchical permission setting.

2.png

III. Basic Settings

The basic setting interface is as follows.

3.png 

 

1. Task name

  • Required.

  • Task name allows letters, Chinese characters, numbers, underscores, minus signs, points and parentheses.


2. Default user group

The purpose of setting a Default User Group is to send notifications to members in the group (see VI. File Processing). Its value is [None] by default.

Click [Edit] button next to the Default User Group, and fill in the User, Dept. or Role fields which are not required, to add group members. The final user group is the union set of user, department and role, and duplicates will be removed.

There are two ways to add a [User].

1) Platform: select users from those of the Decision-making Platform.

2) Custom User: select users from a predefined server dataset.

Click OK and [Next].

IV. Dispatcher Object

There are two types of dispatcher object, which will be introduced separately below.

1. Report template

When a scheduled task has a specific execution target (e.g. send weekly/monthly/annual report based on template contents), then the dispatcher object should be [Report Template], as shown in the figure below:

8.png

1) Select a template: Select a report from the Working Directory of the Designer (this field should not be empty).

2) Type: select the execution type of the report.

  • If you select a CPT report, then you can perform the following four execution on the report. Preview (default), Data Entry, Analysis and New Data Entry.

  • If you select a FRM decision-making report, then you are only allowed to [Preview] the report.

3) Parameter setting: The parameters introduced in the report can be used in conjunction with the [Dispatcher Result]. There are two options for the Input Method in the Set Parameter, namely:

  • Default: if you select Default, then you can select the [Type] of [Value]. You can fill the [Value] field that is in the form of a text box.

  • Dataset: if you select dataset, then the [Type] of [Value] is automatically matched. You can add [Value] in the form of adding a server dataset.

9.png

Note: for precautions for [Set Parameter], please refer to “VII. Precautions” in this article.

4) Dispatcher result: members of the default user group may receive individual results. 

10.png

  • General results will be created by default. If this configuration item is checked, then each member in the default user group will receive an independent report. The folder of each independent report will be named after the username of corresponding member in the default user group.

  • If this configuration item is not checked, then the system will only generate a general report.

Note: The [Dispatcher Result] can only be activated when you have set the 「Default User Group」in the [Basic Setting], otherwise it will be grayed out and cannot be activated.

11.png

The view permission to general reports follows the following rules:

  • Platform users can view general reports only when: they have the permission to directory+ the template permission control is not activated/they have the permission to corresponding task template when the template permission control is activated.

  • Non-platform users can view general reports only when: the template permission control is not activated/they have the permission to corresponding task template when the template permission control is activated.

5) File name: The name of the generated result files including the result report and attachments (excel, word or pdf), support formula such as ${now()}.  If you do not define the file name, the name of generated result report and attachments will be the same as the template name.

6) Accessory archive: You can choose the type of attachment to be generated, including result report (.cpr file), excel03, excel07, word and pdf.  If generate attachment in word format, the chart components in FRM reports are not supported, and only cell element charts are supported. When setting a scheduled task, if you have chosen decision-making report as the template type in the 「Dispatcher Object」 process, and checked excel03, excel07, word and pdf next to the Accessory Archive, then the generated attachments do not support the body background color.

Note: For JAR packages released on December 27, 2018 and later, a result report must be generated by default.

7) File process: The logic for cleansing configuration files. Do not clean up is selected by default.

Note:

  • If you select “Clearing at the end of the task”, then all result files (including cpr. Files and attachments) will be cleaned up after the task ends. Therefore, if a set scheduled task needs to use a scheduled attachment, e.g. check Email Notification, FTP Upload Attachment or Custom Attachment Processing, etc., in VI. File Process, then a prompt will show up, indicating that “the result file has been cleaned up and cannot be found”. Meanwhile, the system will report an error when you access the “Result Link”.

  • When the number of generated files exceeds 10, a confirmation dialog will pop up when you click [Next]: 「There is a N set of result files expected to be generated, which may cause the calculation to be too large. Do you want to continue?」, if you click OK, then the system will proceed to the setting of scheduling cycle.

12.png

 

2. No dispatcher object

If you select [No Dispatcher Object] in the Object Type, then you can set dispatcher result according to the default user group, and no other settings are required. This option is generally used to send notification and announcements of some companies through task schedule, without binding objects.

13.png

V. Scheduling Cycle

Scheduling cycle requires you to define:

14.png

 

1. Start time: set the start time of a task.

  • Immediate execution after configuration: let the task be executed immediately after configuration.

  • Set start time: customize the start time of the task.

15.png

 

2. Execution frequency

  • Only execute once: the task will only be executed once.

  • Simple repeat execution: execute every n minute(s) / hour(s) / day(s) / week(s).

16.png

  • Detailed frequency setting: a combination of frequency settings. You can specify execution time / execution date / execution month.

Note: If you add several detailed frequency settings, only the first one will be displayed as the next run time in Task Management tab, but the real execution time is still a union of all settings. as shown below:

   

  • Expression settings: Set execution frequency in the form of an expression. For details, please refer to: Timed task cycle

You can enter cronExpression in the text box to set frequency, or you can select from pre-defined expressions after clicking the button next to the text box.

When you click the [View Preset Expressions] button, expand the preset expression window, click on the text description, then the text box on it displays and saves the corresponding cronExpression. Then click the [Retract the preset expression] button to close the preset expression window.

21.png

Note: For JAR packages released on July 8, 2020 and later, if the defined Detailed frequency setting is not triggered, a pop-up window will appear to prompt that: The following execution frequency cannot be triggered. Please check the frequency setting and make sure it does not conflict with the task start time and end time.

End time

You can select Only Execute Once, Indefinite, Set End Time or Extra Repeats for end time. The configuration items depend on [Frequency] and End Time:

End Time\Execution Frequency

Only execute once

Simple repeat execution

Detailed frequency setting

Expression settings

End after one execution

Checked by default

--

--

--

Indefinite

--

Optional

Optional

Optional

Set end time

--

Execute until the end time.

Execute until the end time.

Execute until the end time.

Extra repeats

--

Set the number of executions

--

--

22.gif

Execution conditions: Execution conditions will be judged when the execution starts, and the scheduled tasks will be executed if the condition is satisfied. Otherwise, the scheduled tasks will be canceled or executed again after a set time interval, and the condition will be judged again.

  • Always execute: directly execute scheduled tasks without conditional judgment.

  • Formula judgment: Formula judgment refers to the determination of the current formula content before executing the scheduled task. If the formula is true, the scheduled task will continue to be executed. If the formula is false, it will not be executed or delayed.

23.png

  • Custom class judgment: refers to executing a custom class and executing a scheduled task when the return value is true.

24.png

Task restart: Task restart is a preventive measure since task execution may be interrupted due to network failure (which may lead to email transmission failure) or the false result of conditional judgment. If a scheduled task is interrupted, and the Task Restart is activated, then the task will be re-executed according to the restart frequency until it succeeds or reaches the maximum times. The Task Restart is not checked by default.

25.png

Task restart follows the following rules: You can refer to the flowchart in Timing schedule introduction .

  • If the snapshot is not generated, the transmission of corresponding attachment will not be triggered.

  • The restart is applied to the judgment of condition, snapshot generation and attachment transmission one by one. If one link fails, the restart will work.

  • Follow the principle of minimizing working load when restarting: if the snapshot is generated but is not transmitted successfully, the restart begins at attachment transmission and only those (e.g. Email, FTP and custom attachment) that have not been transmitted will be retransmitted.

VI. File Processing

The file processing method corresponds to the dispatcher object of [Report Template] is different from that corresponds to the dispatcher object of [No Dispatcher Object], see below for details.


1. Report template

If the dispatcher object is Report Template, then in the [File Process], the following configuration items next to Processing can be checked. After checking, the corresponding configuration pages will appear in the lower left corner of the list.

26.png

1) Timed calculation: By default, Timed Calculation is checked, which means calculation will be applied to generate result reports (.cpr files) and other attachments.

2) Mounting platform: mount corresponding reports to a directory on the Decision-making Platform after a scheduled task is executed.

Note: Mount name does not support formula at present.

27.png

3) Platform notification: Send a Decision-making Platform notification after a scheduled task is executed.

Check result link to be opened on the platform, and users can click the link to access the result report. This is equivalent to have the right to access the link outside the platform.

  • If the template permission control is not activated, then you can directly access to the result link in the platform notification.

  • If the template permission control is activated, then users can view the template only when they have been assigned with the permission to the template.

Note: For JAR packages released on September 27, 2019 and later, theme and content in the 「Platform Notification」 do not support formula.

4) Email notification: Send an email notification after a scheduled task is executed.  Before setting the email notification, please configure mailbox first. For details, please refer to: Mailbox management.

30.png

The description of each configuration item is shown in the following table:

Configuration item

Description

Recipient

Default User Group by default.

CC and Bcc

Support platform users to select and customize mailbox.

Note: JAR packages released on December 27, 2018 and later support custom mailbox.

Theme/Content

Support formula, required.

Text preview report content

The report content can be previewed in email body.

Text plus result link

Recipient can click the link to access the result reports separately.

Use attachment

If any attachment (including files in Excel03, Excel07, Word or PDF format) has been generated for a scheduled task, the file can be attached to the email. If none attachment file will be generated, this option is grayed out and cannot be selected.

Notes for [Text preview report content] and [Use Attachments]:

  • Display according to generated result reports, that is, display according to the template parameters corresponding to different users.

  • If a recipient has a corresponding result report, it will be sent to the recipient individually.

  • If a recipient has no corresponding result report, then a general report will be sent.

  • If a recipient has neither corresponding result report nor general report, the email sending fails.

  • If a scheduled task will be executed in multiple times, the recipient will receive the result report(s) and attachments each time the task is executed.

  • If a user has multiple result reports in a task, multiple sets of report and attachments are sent, and the template parameters are added to the attachment name.

5) Client notification: send a notification to mobile APP after a scheduled task is executed.

31.png 

The description of each configuration item is shown in the following table:

Configuration item

Description

Push Terminal

The APP Notification must be checked.

Receiver

Default User Group by default.

Message Type

There are three types of message, i.e. Linklink message, graphic message and file message.

Theme

Theme of messages, support formula.

Content

Content of messages, support formula.

Link

There are two types of link, i.e. timed result link and custom link. The timed result links lead to the content of result reports. Custom links can be mounted in the URL generated when a template is previewed in the FineReport Designer. If a custom link is generated by clicking Data Entry Preview in the template data entry interface, then the data entry function is available on clients.

Note: The IP in the URL generated by clicking Preview Template needs to be modified based on actual situation to make the custom link effective.

6) FTP upload: upload result reports and attachments to FTP after a scheduled task is executed.

33.png

7) SFTP upload: upload result reports and attachments to SFTP after a scheduled task is executed.

34.png

8) Custom attachment processing: customize upload method of result reports and attachments after a scheduled task is executed.

35.png

9) Print a file: the set printer will print out the content of result reports after a scheduled task is executed.

36.png

 

2. No dispatcher object

If the [Dispatcher Object] is No Dispatcher Object then in the [File Process], only the following four options next to Processing can be checked. The setting methods of the options are the same as those mentioned above and will not be discussed again.

37.png

VII. Precautions

1. Parameters supported

Parameters supported by task schedule are shown in the following table:

Dispatcher Object

Parameter

Remarks

Report template

$fine_username

User name

$fine_position

Position


$fine_role

Role


today()

Today’s date


A1

Cell in a report


report1~A1

Cell in a report block


No Dispatcher Object

today()

Today’s date


2. Name of parameters unsupported

If the Name set in 「Dispatcher Object」process is the same as the parameter name shown in the table below, which means that the parameter is the default parameter generated during task schedule, then the parameter will not be displayed in the parameter list of result link and the template will be displayed abnormally.

Note: If the Value field set to empty in 「Dispatcher Object」process, then the parameter list of result link will not display the parameter.

 

Name of parameters unsupported

Possible scenarios for result link 

_PAPERHEIGHT

 

Users can check the following options in 「File Process」:

1) Mounting Platform

2) Platform Notification, as well as the result link to be opened on the platform button below.

3) Email Notification, as well as the Text plus result link button below.

 

 

_PAPERWIDTH


_FIT_


executeFormula


fine_username


fr_username


fine_position


fr_userposition


fine_role


fr_authority


showType


showtype


SESSIONID


1) The unsupported default parameters in the table above are not used in the 「Dispatcher Object」 step.

Take the platform notification as an example. Click the result link in the recipient’s email, as shown in the following figure:

 

2) Any one of the unsupported default parameters in the table above is not used in the 「Dispatcher Object」 step.

Take the platform notification as an example. Click the result link in the recipient’s email. There is no SESSIONID in the parameter list and the template is displayed abnormally. as shown below:          


Attachment List


Theme: Decision-making Platform
Already the First
Already the Last
  • Helpful
  • Not helpful
  • Only read

Doc Feedback