{"id":28796,"date":"2017-07-21T13:45:42","date_gmt":"2017-07-21T05:45:42","guid":{"rendered":"http:\/\/localhost\/help\/?page_id=28796"},"modified":"2024-07-05T11:43:35","modified_gmt":"2024-07-05T03:43:35","slug":"scheduled-tasks","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/server-resources\/scheduled-tasks\/","title":{"rendered":"Scheduled Tasks"},"content":{"rendered":"<p class=\"intro-text\">You can schedule a task in Windows to automatically run the <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/time-series-tag-fetch\/#Tag_Discovery_Console_App\">Tag Discovery application<\/a> at specified intervals.<\/p>\n<p class=\"note\">Note: You will need a separate scheduled task for each adaptor used. The number of scheduled tasks required depends on the number of adaptors needed to fetch new tags regularly.<\/p>\n<p class=\"intro-text\">To do this:<\/p>\n<p class=\"intro-text\">1. On the IFS OI Server host machine, open the Windows Task Scheduler (<em><strong>Control Panel &gt; Administrative Tools &gt; Task Scheduler<\/strong><\/em>).<\/p>\n<p class=\"intro-text\">2. Click <strong>Create Task<\/strong> in the <em>Actions<\/em> panel on the right.<\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image090.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28797\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image090.png\" alt=\"\" width=\"1107\" height=\"252\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image090.png 1107w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image090-768x175.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image090-150x34.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image090-24x5.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image090-36x8.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image090-48x11.png 48w\" sizes=\"auto, (max-width: 1107px) 100vw, 1107px\" \/><\/a><\/p>\n<p class=\"intro-text\">The <strong>Create Task<\/strong> window opens.<\/p>\n<p class=\"intro-text\">3. In the <strong>General<\/strong> tab:<\/p>\n<ol class=\"intro-text\" style=\"list-style-type: lower-alpha;\">\n<li><strong>Name<\/strong>: Type the name of the scheduled task.<\/li>\n<li><strong>Description<\/strong>: Type a description.<\/li>\n<li>Security Options: Assign the appropriate user account (click <strong>Change User or Group<\/strong> if necessary).<\/li>\n<li>Select <strong>Run whether user is logged on or not<\/strong>.<\/li>\n<li>Select <strong>Run with highest privileges<\/strong>.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image092.png\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28799\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image092.png\" alt=\"\" width=\"646\" height=\"487\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image092.png 646w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image092-150x113.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image092-24x18.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image092-36x27.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image092-48x36.png 48w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/a><\/p>\n<p class=\"intro-text\">4. In the <strong>Triggers<\/strong> tab, click<strong> New <\/strong>to create a new trigger.<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image094.png\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28800\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image094.png\" alt=\"\" width=\"646\" height=\"487\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image094.png 646w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image094-150x113.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image094-24x18.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image094-36x27.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image094-48x36.png 48w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/a><\/p>\n<p class=\"intro-text\">5. In the <strong>New Trigger<\/strong> window, configure the Trigger as follows:<\/p>\n<ol class=\"intro-text\" style=\"list-style-type: lower-alpha;\">\n<li><strong>Settings<\/strong>: Select the appropriate frequency for how often you want the scheduled task to run, and specify a start date.<\/li>\n<li><strong>Advanced settings<\/strong>: Update settings as required.<\/li>\n<li><strong>Enabled<\/strong>: Select the Enabled check box, otherwise the task will not run.<\/li>\n<li>Click <strong>OK<\/strong> to close the trigger setup and continue.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image096.png\" rel=\"lightbox-3\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28801\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image096.png\" alt=\"\" width=\"605\" height=\"523\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image096.png 605w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image096-150x130.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image096-24x21.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image096-36x31.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image096-48x41.png 48w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/a><\/p>\n<p class=\"intro-text\">6. In the <strong>Actions<\/strong> tab, click<strong> New <\/strong>to create a new action.<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image098.png\" rel=\"lightbox-4\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28802\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image098.png\" alt=\"\" width=\"646\" height=\"487\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image098.png 646w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image098-150x113.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image098-24x18.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image098-36x27.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image098-48x36.png 48w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/a><\/p>\n<p class=\"intro-text\">7. In the <strong>New Action<\/strong> window, configure the action as follows:<\/p>\n<ol class=\"intro-text\" style=\"list-style-type: lower-alpha;\">\n<li><strong>Action<\/strong>: Ensure <em>Start a program<\/em> is selected.<\/li>\n<li><strong>Program\/Script<\/strong>: Enter the location of the IFS OI Server Tag Discovery executable file e.g. C:\\Program Files\\P2 Energy Solutions\\P2 Server\\Data Broker<\/li>\n<li><strong>Add arguments<\/strong>: Enter the datasource name along with the desired parameters e.g. datasource=\"[DataSourceName]\" \/silent \/winAuth<\/li>\n<\/ol>\n<p class=\"intro-text\">See <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/time-series-tag-fetch\/#Tag_Discovery_Console_App\">Time Series Tag Fetch<\/a>\u00a0for a list of available parameters.<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image100.png\" rel=\"lightbox-5\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28803\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image100.png\" alt=\"\" width=\"468\" height=\"507\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image100.png 468w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image100-138x150.png 138w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image100-22x24.png 22w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image100-33x36.png 33w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image100-44x48.png 44w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/a><\/p>\n<p class=\"intro-text\">8. Click <strong>OK<\/strong> to close the Action setup and continue.<\/p>\n<p class=\"intro-text\">9. In the <strong>Conditions<\/strong> tab, in the <strong>Power<\/strong> section, ensure the following are selected:<\/p>\n<ul class=\"intro-text\">\n<li><strong>Start the task only if the computer is on AC power<\/strong><\/li>\n<li><strong>Stop if the computer switches to battery power<\/strong><\/li>\n<\/ul>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image102.png\" rel=\"lightbox-6\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28804\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image102.png\" alt=\"\" width=\"646\" height=\"487\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image102.png 646w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image102-150x113.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image102-24x18.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image102-36x27.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image102-48x36.png 48w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/a><\/p>\n<p class=\"intro-text\">10. In the <strong>Settings<\/strong> tab, ensure the following are selected:<\/p>\n<ul class=\"intro-text\">\n<li><strong>Allow task to be run on demand<\/strong><\/li>\n<li><strong>Stop the task if it runs longer than: 3 days<\/strong><\/li>\n<li><strong>If the running task does not end when requested, force it to stop<\/strong><\/li>\n<\/ul>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image104-1.png\" rel=\"lightbox-7\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28805\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image104-1.png\" alt=\"\" width=\"646\" height=\"487\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image104-1.png 646w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image104-1-150x113.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image104-1-24x18.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image104-1-36x27.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2017\/07\/image104-1-48x36.png 48w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/a><\/p>\n<p class=\"intro-text\">11. Click <strong>OK<\/strong> to create the task and close the window.<\/p>\n<p class=\"intro-text\">12. Run the scheduled task to confirm it is working as expected, and also check the IFS OI Log Viewer to confirm there are no issues logged under the adaptor.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This page describes how to schedule a task in Windows to automatically run the Tag Discovery application at specified intervals.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/server-resources\/scheduled-tasks\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":5286,"parent":3655,"menu_order":9,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[582,221],"class_list":["post-28796","page","type-page","status-publish","has-post-thumbnail","hentry","category-tech-ref","tag-scheduled-task","tag-tag-discovery","Version-4-5-2","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/28796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=28796"}],"version-history":[{"count":2,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/28796\/revisions"}],"predecessor-version":[{"id":67846,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/28796\/revisions\/67846"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3655"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/5286"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=28796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=28796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=28796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}