You can schedule actions to run based on a time and date or based on an event.
You use the Scheduler to run actions automatically at specific times, when files are present, or when certain events occur.
- In the native UI, select in the menu bar or click Schedule in the toolbar.
Each action and host action branch in the active tree pane is listed in the schedule table. Scheduled actions are listed at the top and unscheduled actions are listed below. Sorting by columns only affects the scheduled action rows.
A schedule of actions that you can edit appears.
- Select the action you want to schedule. You can right-click the action row and select Schedule, double-click the action row to select the action and display the Scheduling dialog box, or single-click the action row and click the clock icon.
Alternatively, you can right-click a host or user mailbox action in the Active tab of the tree pane.
The Scheduling dialog box appears.
- In the Scheduling dialog box, select the Run this action automatically check box to enable the following scheduling options.
Note: If you selected an action that is already scheduled, you can click Edit to modify the existing schedule. You can also clear the Run this action automatically check box to unschedule the action.
- When you finish specifying values for scheduling parameters above and click Schedule.
The Scheduling dialog box is dismissed and the new schedule information is displayed on the Schedule page
By default, the schedule does not automatically start when the application is started. You can, however, configure your system to run schedules at start up using the property Automatically run schedules at startup. See Other system options.
For the Cleo LexiCom application, the schedule will only run one action at a time. If more than one action is scheduled for the same time, the actions are run sequentially. If a scheduled action is still running when another action's scheduled time arrives, the action is not started until the running action ends.
For the Cleo Harmony and Cleo VLTrader applications, you control concurrently running scheduled actions using the property Allow Scheduled Actions to Run Concurrently. See Other system options.
Scheduling actions to run at specific dates and times
You can schedule actions to run automatically based on a weekly, monthly, or one-time period. For weekly and monthly scheduling, it is possible to set up multiple day and time ranges.
- In the Scheduling dialog box, select Run this action automatically.
- Select at scheduled date(s) and time(s), and then click Continue.
The Schedule for dialog box appears.
- Specify a weekly, monthly, or one-time schedule. See Scheduling actions to run weekly, Scheduling actions to run monthly, and Scheduling actions to run one time for more information.
- After you specify a schedule, click OK on the Schedule for dialog box.
The Schedule for dialog box is dismissed and the Scheduling dialog box appears.
- Click OK on the Scheduling dialog box.
Your action is scheduled and the schedule is reflected in the table of actions on the Scheduler page.
Scheduling actions to run weekly
You can schedule actions to run automatically on a weekly schedule. You can set up multiple day and time ranges.
- In the Schedule for dialog box, select the Weekly radio button.
- Select a time zone.
The times you select for this schedule are relative to this time zone. The time zone you select is displayed in the Scheduler dialog box in the Scheduled column.
- Select one or more days of the week within the Day(s) of Week section.
- Specify one or more start times (24-hour clock). A start time of 00:00 indicates 12:00 midnight; a start time of 17:00 indicates 5:00 PM.
- Optional: For each start time, specify a recurrence. A recurrence can be scheduled either continuously, by selecting the Recurring continuously check box, or at an interval, by selecting the Recurring every check box and specifying the interval in hours, minutes, and seconds. Finally, choose when the recurrence should stop by selecting a time from the Until menu. An end time of24:00 indicates the end of the day.
- If a different time schedule is required on different days (for example, weekdays and weekends), click New Day(s) and repeat the steps above.
When you configure multiple days, you can scroll through them using the arrow buttons in the upper left of the dialog box.
You can click Remove Day(s) to delete the schedule for the days currently displayed.
- Click OK.
Your new schedule is saved and the schedule table is displayed, including your new schedule information.
Scheduling actions to run monthly
You can schedule actions to run automatically on a monthly schedule. You can set up multiple day and time ranges.
- In the Scheduling dialog box, select the Monthly radio button.
- Select a time zone.
The time zone you select is displayed in the Scheduler dialog box in the Scheduled column.
- Select one or more months and then one or more days of the month within the Day(s) of Month section.
- Specify one or more start times (24-hour clock). A start time of 00:00 indicates 12:00 midnight; a start time of 17:00 indicates 5:00 PM.
- Optional: For each start time, specify a recurrence. A recurrence can be scheduled either continuously, by selecting Recurring continuously, or at an interval, by selecting Recurring every and specifying the interval in hours, minutes, and seconds. Finally, choose when the recurrence should stop by selecting a time from the Until dropdown menu. An end time of 24:00 indicates the end of the day.
- If a different time schedule is required on different months (for example, even months versus odd months), click New Month(s) and repeat the steps to specify days and times.
When you configure multiple months, you can scroll through them using the arrow buttons in the upper left part of the dialog box.
You can click Remove Month(s) to delete the schedule for the months currently displayed.
- Click OK.
Your new schedule is saved and the schedule table is displayed, including your new schedule information.
Scheduling actions to run one time
You can schedule actions to run automatically one time at a specific date and time.
- In the Scheduling dialog box, select One Time.
- Select a time zone.
The time zone you select is displayed in the Scheduler dialog box in the Scheduled column.
- Select a single year, month, day, and time.
- Click OK.
Your new schedule is saved and the schedule table is displayed, including your new schedule information.
Scheduling actions to run automatically by polling for files
You can configure your system to poll folders for files and then run actions automatically when files are present.
Note: This option is available only for Commands actions.
- In the Scheduling dialog box, select the Run this action automatically check box, and then select by polling for files.
- If you want to poll for files continuously, click OK.
If you do not explicitly specify how often to poll for files, default polling period values are used.
- Click OK.
Requirements when polling for files
When you set up an action to run by polling for files, the action will potentially be run according to the period you've configured. However, it will only actually run if one of these conditions are true:
- A PUT, PUT+GET, or LCOPY command within the action has a file to send or copy.
- The CHECK command is present in the action and specific conditions for that command are met.
Note that if an action contains both PUT/LCOPY and CHECK commands, it is the first command encountered that determines whether autosend properties (for PUT and LCOPY) or autocheck properties (for CHECK) are used. Since this could make it difficult to determine the actual schedule, actions designated for autocheck should contain only the CHECK command.
The frequency at which the scheduler checks to see if there are files to send or copy is controlled by the Autosend Check Everyproperty. This indicates that even schedules set up for continuous polling are not actually continuous. Rather, their minimum frequency of polling is determined by Autosend Check Every.
PUT, PUT+GET, and LCOPY command rules
The following rules apply to actions containing
PUT,
PUT+GET, or
LCOPY commands scheduled by polling for files.
- For an action to be scheduled this way, at least one of its PUT, PUT+GET, or LCOPY commands must use the delete after transfer (-DEL) option.
- If an action contains both PUT (or PUT+GET) and LCOPY commands, whichever type is found first in the action drives its scheduling. Even though this is allowed, it is highly recommended that autosend actions contain only one autosend-type command (for example, PUT/LCOPY -DEL). This ensures all autosends process only stable files. Furthermore, if multiple scheduler threads are in use, separating autosend commands should increase the throughput of the scheduler loop.
- When autosend is activated, files are checked for stability before they are sent or copied. This is an important feature to prevent to an unstable or incomplete file from being sent or copied. For this reason, all PUT and LCOPY commands should use autosend.
CHECK command rules
Note: The CHECK command is available only in the Cleo Harmony and Cleo VLTrader applications.
The following rules apply to actions containing
CHECK commands scheduled by polling for files.
- The CHECK command must have a CHECK -FIL or CHECK -DIR command in the action.
- The CHECK command must specify an Age value of >nn[D|H|M|S] (where nn is a value of 0-99).
- The CHECK command may not specify the Count parameter. Therefore, by default, the count will be only one (1).
- If a file is reported on a particular CHECK run, and it is not subsequently handled (for example, moved somewhere else or processed in some way), it will be reported again on future executions of the command. For this reason, it is recommended that the Execute On Check Conditions Met property is specified, and that it contains the proper system commands needed to clean up the file.
- For details of the CHECK command, see CHECK command.
- The frequency of autochecks is based on the setting of the Age parameter and the age of the files found. It is easiest to understand this by example:
- Example 1 -- Age is >1D
- Given the command
CHECK -FIL * Age=>1D
- and given the initial files and their ages:
- File1 (0.9D)
- File2 (0.9D)
- File3 (0.7D)
- File4 (0.7D)
- Since no files are currently older than one day, the first check would be run in 0.1 days, when File1 and File2 become one day old. After that, the next check is run 0.2 days later, when File3 and File4 become one day old. After that, if there are no additional files present, the next check will be run one day later (based on the 1D value set for the Age).
Note:
When the first check is run, File1 and File2 are reported. Their file paths are available to any %file% macro present within the Execute On Check Conditions Met property. When the command is run again, if the same files are present, they are counted and reported again. Therefore, if you do not want to be notified multiple times regarding the same file, it is imperative that the files are dealt with (that is, removed) in the Execute On Check Conditions Met command.
- Example 2 -- Age is >0D
- Given the command:
CHECK -FIL * Age=>0D
- and given the initial files and their ages:
- File1 (0.9D)
- File2 (0.9D)
- File3 (0.7D)
- File4 (0.7D)
Since there are four files with an age greater than zero days (that is, they simply exist), the initial check reports all files. After that, subsequent checks will take place at a frequency determined by the Autosend Check Every property.
Note: The option to only run Action if files are found to send or check is not available for JavaScript actions.
Scheduling actions to run based on events
You can configure your system to run actions based on a
trigger created when certain events occur. When the trigger is created, the action runs immediately. Note that, by default, actions configured to be triggered for an FTP server (under a Users host or a Local FTP Users host) are not triggered immediately. They are triggered when the connected FTP client issues another command or the session is closed. See
Trigger At Upload Completion in
Local FTP users mailbox advanced properties.
Triggers are generated when:
- a new file arrives in a folder
- a new file fails to arrive in a folder
- a user session ends successfully
- a user session fails to end.
Important: Only actions that are in scope of the triggering event are actually run. The trigger event's scope is limited to actions whose host is in the same host folder as the trigger's mailbox or in a parent host folder of the trigger's mailbox.
When you schedule an action to be run based on a trigger, the Scheduler window displays the triggering event in the Scheduled column. If there are multiple events, they are displayed in the Scheduled column as a comma-separated list.
- In the Scheduling dialog box, select Run this action automatically check box and then select when ANY of the following events occur.
- Select the events you want to trigger actions. Choose from the following:
- New file arrives
- Runs the action when a new file arrives in the folder. You can choose successful or failed file transfers or both to trigger the action.
- This event type is valid only for FTP and SFTP uploads, AS2 and HSP receives, and LCOPY commands.
- For a Commands action scheduled for
new file arrives
, the Commands action will be run only if at least one of the sources of the PUT or LCOPY commands in the action match the path of the new file. And then at runtime, all of the sources of the PUT, LCOPY, LDELETE, and LREPLACE commands that match the new file's path are modified to explicitly point to the new file.
- User session ends
- Runs the action when an FTP or SFTP user session ends. Choose successful or failed session end or both to be the trigger event.
-
Note: This option is available only for JavaScript actions.
Note: For both new file arrives
and user session ends
triggers, the trigger object is accessible in the JavaScript action viaISessionScript.getTrigger()
. The user session end trigger includes all the relevant new file arrives
triggers that occurred during the session.
- Click OK.
When the trigger event occurs, the action runs.
Comments
0 comments
Please sign in to leave a comment.