{"id":4875,"date":"2019-01-18T20:42:22","date_gmt":"2019-01-18T20:42:22","guid":{"rendered":"https:\/\/max-drake.cc\/?p=4875"},"modified":"2019-01-18T20:43:17","modified_gmt":"2019-01-18T20:43:17","slug":"scheduling-a-process-with-task-manager","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=4875","title":{"rendered":"Scheduling a process with Task Manager"},"content":{"rendered":"<p>On exploring VoiceMacro I noticed that it has a scheduler, so you can start your scripts at a specific time.<\/p>\n<p>I realised that with AutoHotKey .AHK its not as elegant, but you can use your computers Windows Task Scheduler. If you go to your start button and type Task Scheduler it comes up.<\/p>\n<p>The first video demo&#8217;s how to run a autohotkey EXE file using Task Scheduler , the 2nd example is just a demo of a couple of scheduled tasks using .BAT files to open and close multiple programmes in windows with Task Scheduler.<\/p>\n<p><iframe data-src=\"https:\/\/www.youtube.com\/embed\/F6O4qDs9gVA\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe><br \/>\n<iframe data-src=\"https:\/\/www.youtube.com\/embed\/xZhrs3jhIfU\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe><\/p>\n<p>I went through and followed the process with my opening the web page and logging into my blog website. The steps below show it for a Computer startup but I wanted to change it to run when I logged in to my PC so I rescheduled it, it was quite easy to do. I then locked myself out of my computer and had to re-boot so it started on when I logged in. It opened the browser and tried to but the pause timing is still a bit off so it didn&#8217;t quite open the page, but after VoiceMacro started I did a voice command and it started fine.\u00a0 So, principles are sound, just my shonky coding to get right and it&#8217;ll run like a dream.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4880 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_11_16-Dashboard-\u2039-Vast-\u2014-WordPress-229x300.jpg\" alt=\"\" width=\"1722\" height=\"2256\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_11_16-Dashboard-\u2039-Vast-\u2014-WordPress-229x300.jpg 229w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_11_16-Dashboard-\u2039-Vast-\u2014-WordPress-768x1005.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_11_16-Dashboard-\u2039-Vast-\u2014-WordPress-782x1024.jpg 782w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_11_16-Dashboard-\u2039-Vast-\u2014-WordPress.jpg 1226w\" data-sizes=\"(max-width: 1722px) 100vw, 1722px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1722px; --smush-placeholder-aspect-ratio: 1722\/2256;\" \/><\/p>\n<p><img decoding=\"async\" class=\"wp-image-4879 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_12_02-Dashboard-\u2039-Vast-\u2014-WordPress-232x300.jpg\" alt=\"\" width=\"1662\" height=\"2149\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_12_02-Dashboard-\u2039-Vast-\u2014-WordPress-232x300.jpg 232w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_12_02-Dashboard-\u2039-Vast-\u2014-WordPress-768x993.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_12_02-Dashboard-\u2039-Vast-\u2014-WordPress-792x1024.jpg 792w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_12_02-Dashboard-\u2039-Vast-\u2014-WordPress.jpg 1191w\" data-sizes=\"(max-width: 1662px) 100vw, 1662px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1662px; --smush-placeholder-aspect-ratio: 1662\/2149;\" \/><\/p>\n<p><img decoding=\"async\" class=\"wp-image-4878 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_12_24-Dashboard-\u2039-Vast-\u2014-WordPress-225x300.jpg\" alt=\"\" width=\"1656\" height=\"2208\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1656px; --smush-placeholder-aspect-ratio: 1656\/2208;\" \/><\/p>\n<p><img decoding=\"async\" class=\"wp-image-4877 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_12_55-Dashboard-\u2039-Vast-\u2014-WordPress-232x300.jpg\" alt=\"\" width=\"1670\" height=\"2159\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_12_55-Dashboard-\u2039-Vast-\u2014-WordPress-232x300.jpg 232w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_12_55-Dashboard-\u2039-Vast-\u2014-WordPress-768x994.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_12_55-Dashboard-\u2039-Vast-\u2014-WordPress-791x1024.jpg 791w\" data-sizes=\"(max-width: 1670px) 100vw, 1670px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1670px; --smush-placeholder-aspect-ratio: 1670\/2159;\" \/><img decoding=\"async\" class=\"wp-image-4876 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_13_09-Dashboard-\u2039-Vast-\u2014-WordPress-229x300.jpg\" alt=\"\" width=\"1667\" height=\"2184\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_13_09-Dashboard-\u2039-Vast-\u2014-WordPress-229x300.jpg 229w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_13_09-Dashboard-\u2039-Vast-\u2014-WordPress-768x1005.jpg 768w\" data-sizes=\"(max-width: 1667px) 100vw, 1667px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1667px; --smush-placeholder-aspect-ratio: 1667\/2184;\" \/><\/p>\n<p>I had a bit of a read about workarounds for sending mail, usually linked to an event, eg a log event and then that triggers an email being sent somewhere. PowerShell command line is used instead of the task manager, and as that is dos stuff I didn&#8217;t bother to read much further, but it is possible.<\/p>\n<p>I took this screenshot of some of the scheduled tasks on my computer, a bit scary how many of them are there:<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4881 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-20_13_22-Add-New-Post-\u2039-Vast-\u2014-WordPress-300x286.jpg\" alt=\"\" width=\"1705\" height=\"1625\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-20_13_22-Add-New-Post-\u2039-Vast-\u2014-WordPress-300x286.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-20_13_22-Add-New-Post-\u2039-Vast-\u2014-WordPress-768x733.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-20_13_22-Add-New-Post-\u2039-Vast-\u2014-WordPress-1024x977.jpg 1024w\" data-sizes=\"(max-width: 1705px) 100vw, 1705px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1705px; --smush-placeholder-aspect-ratio: 1705\/1625;\" \/><\/p>\n<h2>Scheduling an Automation<\/h2>\n<p>This could be a useful tool in my arsenal for automating specific tasks, especially on my VPS (Virtual Private Server) as that is running continuously so scheduling tasks in the middle of the night would be no problem.<\/p>\n<p>You could go and scrape some stock market web pages around the world and compile the results in a Spreadsheet or some other event.\u00a0 This is the personal one I was looking to do with UiPath of getting some specific information like weather and tides and then putting it into an email to send to myself. A personalised update to start the day.<\/p>\n<h2>Scheduled Emails<\/h2>\n<p>I am still trying to figure out how I could automate this. In Thunderbird there is a send later add-on and Gmail has <strong><a href=\"https:\/\/www.boomeranggmail.com\/\" target=\"_blank\" rel=\"noopener\">boomerang<\/a>. <\/strong>Either I have to automate the writing of an email or setup how to do an attachment to an email.<\/p>\n<p>A simple solution I&#8217;ll test is just do a <strong>File &gt; Attach&gt; Web Page<\/strong> and get a browser page links and then use the Thunderbird Plugin<strong> Send Later<\/strong> to schedule a daily email with the links.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4882 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-20_54_57--300x74.jpg\" alt=\"\" width=\"1719\" height=\"424\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-20_54_57--300x74.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-20_54_57--768x189.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-20_54_57--1024x252.jpg 1024w\" data-sizes=\"(max-width: 1719px) 100vw, 1719px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1719px; --smush-placeholder-aspect-ratio: 1719\/424;\" \/><\/p>\n<p>Unfortunately, it comes out garbled in the email, saying that JavaScript is not enabled (I checked, it is in Thunderbird) . Here is <a href=\"https:\/\/support.mozilla.org\/en-US\/questions\/1238428\" target=\"_blank\" rel=\"noopener\"><strong>a discussion about it<\/strong><\/a>. I went to Thunderbird Config and checked on JavaScript.enabled (true) and restarted TBird, still no joy.<\/p>\n<p><img decoding=\"async\" class=\"alignleft wp-image-4883 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-21_17_09--300x217.jpg\" alt=\"\" width=\"1851\" height=\"1339\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-21_17_09--300x217.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-21_17_09--768x555.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-21_17_09--1024x741.jpg 1024w\" data-sizes=\"(max-width: 1851px) 100vw, 1851px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1851px; --smush-placeholder-aspect-ratio: 1851\/1339;\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Also the attachments get a bit garbled too. This is what the web page link is:<\/p>\n<p><strong>https:\/\/www.metservice.com\/towns-cities\/wellington\/wellington-city<span style=\"color: #008000;\">#<\/span>!\/two-day<\/strong><\/p>\n<p>And this is what comes from the attachment:<\/p>\n<p><strong><span style=\"color: #ff0000;\">file:\/\/\/C:\/Users\/drake\/AppData\/Local\/Temp\/<\/span>httpswww.metservice.comtowns-citieswellingtonwellington-city<span style=\"color: #008000;\">%23<\/span>!two-day-1.html<\/strong><\/p>\n<p>The first part has a file path and the https onwards have no &#8220;\/&#8221; in the path, so cant find. Also the <span style=\"color: #008000;\">#<\/span> is changed to <span style=\"color: #008000;\">%23<\/span><\/p>\n<p>You could just have a set of links in the body of the email, that would work. You&#8217;d still have to open the pages to see what they say (<em><strong>Another way is to put them in a specific folder in Bookmark toolbar and ight click on that tab and select &#8220;Open All in Tabs&#8221;<\/strong><\/em>)<\/p>\n<p>The Send Later add-in for Thunderbird works fine though.<\/p>\n<h2><strong>End Comment<\/strong><\/h2>\n<p>I found the Task Scheduler quite easy to use. I&#8217;ll think about where I could use it in an automated process.<\/p>\n<p>I&#8217;ll need to investigate the email situation a bit more, there is potential there, it needs a bit more exploration and research.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On exploring VoiceMacro I noticed that it has a scheduler, so you can start your scripts at a specific time. I realised that with AutoHotKey .AHK its not as elegant, but you can use your computers Windows Task Scheduler. If you go to your start button and type Task Scheduler it comes up. The first [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4876,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[204,42],"tags":[218,175,219,48,220,217],"class_list":["post-4875","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","category-productivity","tag-automate-tasks","tag-automation","tag-daily-scheduled-emails","tag-productivity","tag-thunderbird","tag-windows-task-scheduler"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_13_09-Dashboard-\u2039-Vast-\u2014-WordPress.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2019\/01\/2019-01-19-19_13_09-Dashboard-\u2039-Vast-\u2014-WordPress.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/4875","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4875"}],"version-history":[{"count":0,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/4875\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/4876"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}