User Guide > Getting Started Guide > Calendar Conditions

Calendar Conditions

Aim:
- Creating a calendar
- Creating a calendar keyword
- Assigning this calendar keyword to a file transfer

Lesson 8

It is very easy and helpful to schedule tasks through Schedule objects. Calendar objects can additionally be included as business processes often dependent on particular days.

In this lesson, we adjust the execution of the existing file transfer. It should be started Mondays to Fridays, but not on weekends.

  1. Open the folder in your Explorer in which all existing sample objects are stored.
  2. Click the  button in the toolbar.
  3. Select the object type CALE (Calendar).
  4. Assign an appropriate name.
  5. Double-click the Calendar object to open it.

The weeks are graphically displayed in the Calendar tab.

Now the calendar must be linked to the FileTransfer object. This is done with calendar keywords.

  1. Open the Calendar tab.
  2. All calendar keywords are listed on the right side. As this Calendar object has been newly created, there is only the default keyword STATIC.
    Different types of calendar keywords are available, each having its own Form Assistant for the quick and easy assignment of days.
  3. Right-click with the mouse button somewhere in the list area and select the command New Keyword -> Weekly.
  4. A dialog window opens in which this keyword can be renamed to WEEKDAYS.
  5. Remove the default keyword STATIC via the Del button or the command "Delete keyword" in the context menu (right mouse button).
  6. Now select the command Calendar Definition... (context menu) for the keyword WEEKDAYS. A Form Assistant opens.
  7. Highlight Mo, Tu, We, Th, Fr and click OK.

  8. Store the modifications using the  button in the toolbar. All Mondays through to Fridays are now highlighted in the calendar.
     If several calendar keywords are created, the days of the currently selected calendar keyword are highlighted.
  9. The calendar keyword WEEKDAYS now contains the dates of all weekdays.

  10. Close the Calendar object.

The Calendar object is now ready for use. In the next step, we assign the calendar keyword to the file transfer in the schedule.

  1. Open the Schedule object.
  2. Change to the Schedule tab and highlight the file transfer.
  3. Right-click the popup-menu command Properties.
  4. Change to the Calendar tab and activate the checkbox of the same name.
  5. Select "Execute if one condition matches".
  6. Select your Calendar object and the keyword WEEKDAYS, then click OK.

  7. The Schedule tab now contains the letter "C" in the Conditions column which indicates that the calendar condition has been set.

  8. Store your modifications using the  button in the toolbar.
  9. Close the Schedule object.

In accordance with the definitions made, the FileTransfer object will run from Mondays to Fridays. 

Note that this only applies when the file transfer was activated by the Schedule.

 

Exercise

Create a second calendar keyword in the Calendar object which includes all Saturdays and Sundays. Now select the WEEKEND keyword in the FileTransfer object instead of the WEEKDAYS keyword. Hence, the FileTransfer object does not run on days between Monday and Friday.

End the Schedule object and re-assign the WEEKDAYS keyword to the FileTransfer object.