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

Removing Duplicate Windows Tasks for Scheduled Views

When installing Aptify 5.5.1 and up to a 5.5 and up system that has existing scheduled views (or an Aptify 5.5.1 and up system where the Aptify AsyncProcessor.exe for that version has not been applied), there is a scenario where a duplicate Windows Tasks may be created and a scheduled view may be run more than once. This can occur when the view is modified after applying the Aptify update. When modified (including simply opening and closing the view's properties dialog), the Scheduled Tasks record is updated and a Windows Task is created on the application server using the view's UniqueID.

As of 5.5.1, Aptify uses the view's UniqueID in the name of the Windows Task. However, scheduled views created in 5.5 and earlier already have a Windows Task that uses the view's RecordID in the name. The previous Windows Tasks is never deleted or disabled, allowing the scheduled view to run more than once. To work around this issue, the Aptify installer includes an update to the Views entity object as well as an Entity Bulk Operation to help you create a new Windows Task for existing scheduled views.

Note for those installing Aptify 5.5.2 and up

If your Application Server was updated to ensure that there are no duplicate windows for scheduled views in a previous release, you do not have to perform the steps below after applying the updated version of the Aptify AsyncProcessor.exe file if the database server is already running the previous Aptify release and the Application Server is running the Aptify AsyncProcessor.exe file from the previous release. 

For example, if an Application Server was updated to ensure that there are no duplicate windows for scheduled views in 5.5.2, the steps below do not have to be performed when updating to Aptify 5.5.3 update if the 5.5.3 version of the Aptify AsyncProcessor.exe file has already been applied, and the database server is running 5.5.2.

Note

The steps below require that an organization delete or disable the existing Windows Tasks for scheduled views. Deleting the Windows Tasks will also remove any run execution history for this particular task within the Windows Task Scheduler. Aptify recommends you review your business processes to determine which approach is suitable for your organization.

 

Perform the steps below to ensure scheduled views are not run more than once. 

  1. Install the Aptify update on your database server if you have not done so already.
  2. Apply the updated AptifyAsyncProcessor to your application server if you have not already. See Updating the AptifyAsyncProcessor.exe File for more details on how to perform this step.
  3. If started on your application server, open the Windows Services dialog (Start > Control Panel > Administrative Tools >Services) and stop the Aptify 5.0 Asynchronous Processor or Aptify 5.5 Asynchronous Processor service (depending on the original version of the application server).
  4. Open the Task Scheduler dialog (Start > Control Panel > Administrative Tools >Task Scheduler), select Task Scheduler Library and sort the Windows Tasks by Name in reverse order.

    By default, Task names that start with View Auto-Scheduler denote scheduled views.



  5. Depending on your organization best practices, disabled or delete all Windows Tasks for scheduled views (that is, tasks that start with View Auto-Scheduler) using one of the methods below:
    • You can disable one or more Windows Task by selecting the tasks you want to disable, and then right-click and select Disable.
    • You can delete one or more Windows Tasks by selecting the tasks you want to delete, and then right-click and select Delete.



  6. From the Windows Services dialog (Start > Control Panel > Administrative Tools >Services), start the Aptify 5.0 Asynchronous Processor or Aptify 5.5 Asynchronous Processor service (depending on the original version of the application server).
  7. Log into the Aptify database with a user account that has system administrator access.
  8. Go to the Views service and open the All Scheduled Views view.
    • You can also create your own view by creating view that is filter by IsScheduled set to 1 (or True).

      The Entity Bulk Operation wizard is supported for use in List, Prompt, and Chart Drilldown views.



       

  9. In the view's toolbar, select the Entity Bulk Operations Wizard button to launch the EBO wizard. 
  10. Click Next.


     
  11. Select the Create/Update Scheduled Tasks for Scheduled Views operation. 
  12. Click Next.
  13. Click Finish.
    • This operation will update the scheduled views in the view (and the corresponding Scheduled Tasks records) so that a new Windows Tasks is created on the application server based on the view's UniqueID.
       
  14. From the application server, open the Task Scheduler to verify that new Windows Tasks are created (and enabled) based on the view's UniqueID.


     
  15. Lastly, run the necessary tests to ensure that scheduled views are run only once.

Copyright © 2014-2017 Aptify - Confidential and Proprietary