If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Creating a Scheduled Task

The Scheduled Tasks service contains a separate record for each configured Scheduled Task. Scheduled Task records define tasks that are scheduled to run on a specified Application Server at a pre-defined date and time.

Follow these steps to create a Scheduled Task record:

  1. Open a new Scheduled Task record.
    • The Scheduled Tasks service is in the Process Pipeline Administration application.
       
  2. Enter a name for the task in the Name field

    Each scheduled task defined in the system must have a unique name. This is because the Windows Scheduler, which is used to schedule the tasks, requires unique names for all tasks.The name cannot contain any non-alphanumeric characters (such as slashes, dots, or dashes). An error will occur if the name contains such characters.



  3. Enter a description of the task in the Job Description field.
  4. Enter the name of the Process Flow that this task will execute in the Process Flow link box.
    • This field links to the Process Flows service.
    • The specified Process Flow must have Execution Mode set to Asynchronous and Execution Location set to Server in order for an Application Server to execute it.
    • Process flows are defined using the Process Pipeline functionality. See How to Create a Process Pipeline for information on creating process flows.
       
  5. Select a Priority for the task.
    • Available options are Low, Medium, and High.
    • New records default to Medium.
    • An Application Server will process higher priority tasks first. Consider the following example:
      • There are two pending run records for the same Application Server: one run has a Medium priority, and the other has a Low priority.
      • The Application Server only has one thread available when it polls the database server.
      • The Application Server will download and execute the Medium priority run first before processing the Low priority run.
         
  6. Enter the name of the Application Server that will execute the task's Process Flow Runs in the Application Server link box. This field links to the Application Servers service.
    • After saving a Scheduled Task, you cannot change the Application Server.
    • To change the Application Server that runs a particular task, disable the original Scheduled Tasks record and create a new one that uses the new Application Sever.
       
  7. Enter the name of the scheduler agent in the Service link box.
    • This field specifies the scheduler that Aptify will use to create the scheduled task.
    • Aptify ships with three configured Scheduled Task Services record:
      • Windows Scheduler: This service creates a scheduled task in Microsoft's Windows Scheduler.
      • Remote Scheduler: This service saves a Scheduled Task without creating a Windows Scheduled Task. After the record is saved, an Application Server converts the record's Service from Remote Scheduler to Windows Scheduler and creates a Windows Scheduled Task. This service is provided to allow users who do not have the required permissions on the Application Server to create Scheduled Tasks. Aptify's view scheduling, delayed message delivery, and message scheduling features use the Remote Scheduler service.
      • Schedule Only: This service is reserved for future use. It does not create a Windows Scheduled Task.
         
    • This field links to the Scheduled Task Services service.
  8. Enter the task's category in the Category field.
    • This field links to the Scheduled Task Categories service.
    • Task Categories are used to classify scheduled tasks into specific groups which share similar business functionality.

      Scheduled Tasks Record
  9. On the Schedule tab, enter the Job Account Name.
    • This is the user account that will be used to run the Scheduled Task on the Application Server. It is also the account that creates the Process Flow Runs record in Aptify.
    • The Job Account user must have a trusted user account in Aptify with the appropriate privileges to read and edit Scheduled Tasks records, read and create permissions for Process Flow Runs and its sub-type, and execute the process flow.
    • You can specify the same user account that is running the Application Server's Aptify Asynchronous Processor or a different user account.
    • These fields are required when using the Windows Scheduler service.
       
  10. Enter the Job Account Password
    • This is the password for the user account you entered in the Job Account Name field.
    • Only users who have access to the key can enter a value in this field. Also, any user who will create a Scheduled Task (manually, via View Scheduling, via Delayed Message Delivery, or via Message Scheduling) needs access to this key to successfully save the record and create the Windows Scheduled Task.
    • Note that this field is encrypted by default using the Generic Entity Encryption Key. By default, the sa user and members of the supplied Accounting, Administrators, and/or Users groups have access to this key.
    • Depending on the security model that your organization has implemented, you may want to create a new key to encrypt this field and allow only designated users access to that key. This is the recommended approach but you should use the same key to encrypt this field that you use to encrypt the Default Job Account Password field in the Application Servers entity. See Installing an Application Server.
    • See Managing Field Level Encryption for information on using Field Level Encryption.
    • See Scheduling Messages for Future Delivery for information on Delayed Message Delivery, Enabling View Scheduling for information on View Scheduling, and Message Schedules and Recurring Delivery for information on Message Scheduling.
       
  11. Set the frequency for the scheduled task from the Frequency Type list
    • Frequency Type = Once, Run when service starts, or Run when computer is idle
      • Select a Start Time.
      • Select a Start Date.
         
    • Frequency Type = Daily
      • Select how often the daily task runs. For example, select 3 for the task to run every three days.
      • Select the start time and start date.
      • If applicable, select an end date.
      • If you want the task to repeat multiple times on the specified days, select the Repeat Task option and enter the frequency (for example, a task can repeat every hour until 9 PM).
         
    • Frequency Type = Weekly
      • Select how often the weekly task runs. For example, to configure a task to run on Tuesday and Wednesday of every third week, select the -Tuesday and Wednesday options and select 3 from the list.
      • Select the start time and start date.
      • If applicable, select an end date.
      • If you want the task to repeat multiple times on the specified days,select the Repeat Task option and enter the frequency (for example, a task can repeat every hour until 9 PM).
         
    • Frequency Type = Monthly
      • Select how often the monthly task runs. For example, to configure a task to run on the fifth day of January and March, select 5 in the list and select the Jan and Mar options.
      • Select the start time and start date.
      • If applicable, select an end date.
      • If you want the task to repeat multiple times on the specified days, select the Repeat Task option and enter the frequency (for example, a task can repeat every hour until 9 PM).
         
    • Frequency Task = Monthly Relative
      • Select how often the monthly task runs. For example, to configure a task to run on the second Thursday of each month, select Second, then Thursday, and then select all of the month options.
      • Select the start time and start date.
      • If applicable, select an end date.
      • If you want the task to repeat multiple times on the specified days, select the Repeat Task option and enter the frequency (for example, a task can repeat every hour until 9 PM).

         Specifying a Task's Schedule

  12. If you want the task to be deleted from the Windows Scheduler on the Application Server once the timeframe in which the task should be execute is past, select the Delete the task if not scheduled to run again option.
    • Once the time in which the task should run has expired, the task is deleted from the Windows Scheduler on the application server. Note that the Scheduled Tasks and associated Process Flow Runs records are not deleted in the Aptify database and the task can be re-activated at a later date by modifying the frequency information on the Scheduled Tasks record in Aptify.
       
  13. Confirm that the Is Enabled option is selected on the Schedule tab.
    • If you want to disable a Scheduled Task, clear the Is Enabled option.
       
  14. Click the Process Flow Input tab.
  15. Configure each input map as necessary.
    • The displayed input maps are imported from the specified Process Flow; they specify information that the Application Server will use when executing the Process Flow.
    • See Managing Process Flows and Configuring Process Flow Input Maps for more information on Process Flows and configuring Input Maps.

      Configure Input Map
  16. Save and close the Scheduled Tasks record.
  17. On the Application Server, click Start > Control Panel > Scheduled Task to open the Scheduled Task window.
  18. Confirm that a new Scheduled Task has been added to the Windows Scheduler using the name and scheduling criteria that you defined in the Scheduled Task record.
  • The Job Account Name you specified on the Scheduled Tasks record appears in the Run as: field, as shown below. 

    Windows Scheduled Task

Copyright © 2014-2019 Aptify - Confidential and Proprietary