{"id":193009,"date":"2023-07-06T09:11:15","date_gmt":"2023-07-06T13:11:15","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=193009"},"modified":"2023-07-06T09:11:02","modified_gmt":"2023-07-06T13:11:02","slug":"how-to-run-r-from-the-task-scheduler","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/","title":{"rendered":"How to Run R from the Task Scheduler"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In a prior post, we covered&nbsp;<a href=\"https:\/\/theautomatic.net\/2017\/10\/03\/running-python-task-scheduler\/\">how to run Python from the Task Scheduler on Windows<\/a>. This article is similar, but it\u2019ll show how to run R from the Task Scheduler, instead. Similar to before, let\u2019s first cover how to R from the command line, as knowing this is useful for running it from the Task Scheduler.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-running-r-from-the-command-line\"><strong>Running R from the Command Line<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To open up the command prompt, just press the windows key and search for&nbsp;<strong>cmd<\/strong>. When R is installed, it comes with a utility called&nbsp;<strong>Rscript<\/strong>. This allows you to run R commands from the command line.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If&nbsp;<strong>Rscript<\/strong>&nbsp;is in your PATH, then typing&nbsp;<strong>Rscript<\/strong>&nbsp;into the command line, and pressing enter, will not result in an error. Otherwise, you might get a message saying&nbsp;<strong><em>\u201c\u2018Rscript\u2019 is not recognized as an internal or external command.\u201d<\/em><\/strong>&nbsp;If that\u2019s the case, then to use&nbsp;<strong>Rscript<\/strong>, you will either need to add it to your PATH (as an environment variable), or append the full directory of the location of&nbsp;<strong>Rscript<\/strong>&nbsp;on your machine. To find the full directory, search for where R is installed your computer. For instance, it may be something like below (this will vary depending on what version of R you have installed):<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>C:\\Program Files\\R\\R-3.4.3<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Within this folder, there should be a sub-folder called&nbsp;<strong>bin<\/strong>. This sub-folder contains&nbsp;<strong>Rscript<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thus, the full path is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>C:\\Program Files\\R\\R-3.4.3\\bin\\Rscript<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For appending the PATH variable, see&nbsp;<a href=\"https:\/\/www.howtogeek.com\/118594\/how-to-edit-your-system-path-for-easy-command-line-access\/\">this link<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using the above we can run an R command like this:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u201cC:\\Program Files\\R\\R-3.4.3\\bin\\Rscript\u201d -e \u201ccat(\u2018this is a test\u2019)\u201d<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Or \u2013 if you have Rscript in your path, you can run this:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Rscript -e \u201ccat(\u2018this is a test\u2019)\u201d<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This code will run the&nbsp;<strong>cat<\/strong>&nbsp;command to print out&nbsp;<em>test<\/em>. The quotes are necessary around the full path to&nbsp;<strong>Rscript<\/strong>&nbsp;in the first option because of the spaces in the path name. The&nbsp;<strong>-e<\/strong>&nbsp;flag refers to&nbsp;<em>expression<\/em>. Thus the expression following&nbsp;<strong>-e<\/strong>&nbsp;gets executed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hence, if we want to run an R script from the command line, we can call&nbsp;<strong>source<\/strong>&nbsp;with&nbsp;<strong>Rscript<\/strong>. Suppose the name of the script we want to run is called \u201cC:\/path\/to\/script\/some_code.R\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then, we can run this script from the command line like so:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Rscript -e \u201csource(\u2018C:\/path\/to\/script\/some_code.R\u2019)\u201d<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Running R from the Task Scheduler<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we can take this notion to run R via the Task Scheduler. Pressing the windows key, followed by typing&nbsp;<strong>\u201ctask scheduler\u201d<\/strong>&nbsp;should bring the Task Scheduler up. Once it\u2019s open, click on&nbsp;<strong>\u201cAction\u201d<\/strong>, and then press&nbsp;<strong>\u201cCreate Task\u201d<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"640\" height=\"455\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/task-scheduler-create-task-theautomatic-net.jpg\" alt=\"\" class=\"wp-image-193011 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/task-scheduler-create-task-theautomatic-net.jpg 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/task-scheduler-create-task-theautomatic-net-300x213.jpg 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/455;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After this, you will see a place where you need to input the name of your task.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"640\" height=\"123\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-name-task-theautomatic-net.jpg\" alt=\"\" class=\"wp-image-193013 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-name-task-theautomatic-net.jpg 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-name-task-theautomatic-net-300x58.jpg 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/123;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You will also see where you can select&nbsp;<strong>\u201cRun whether user is logged on or not.\u201d<\/strong>&nbsp;If you need to run a script in production where you won\u2019t necessarily be logged on all the time, then you should select the&nbsp;<strong>\u201cwhether user is logged on or not\u201d<\/strong>&nbsp;option. As a note, however, you will need to have the appropriate permissions for this to work for you. This generally means you\u2019ll need to have&nbsp;<a href=\"https:\/\/www.smartftp.com\/en-us\/support\/kb\/2691\">batch job rights<\/a>. If you\u2019re an administrator on the machine you\u2019re creating the task, then this shouldn\u2019t be a problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re just running a task on a computer where you\u2019ll be logged on when you need it to run, then you can select the&nbsp;<strong>\u201cRun only when user is logged on\u201d<\/strong>&nbsp;option.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"631\" height=\"105\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-user-logged-on-or-not-task-theautomatic-net.jpg\" alt=\"\" class=\"wp-image-193016 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-user-logged-on-or-not-task-theautomatic-net.jpg 631w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-user-logged-on-or-not-task-theautomatic-net-300x50.jpg 300w\" data-sizes=\"(max-width: 631px) 100vw, 631px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 631px; aspect-ratio: 631\/105;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The next step is to select the&nbsp;<strong>\u201cTriggers\u201d<\/strong>&nbsp;tab.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"640\" height=\"360\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-create-trigger-task-theautomatic-net.jpg\" alt=\"\" class=\"wp-image-193019 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-create-trigger-task-theautomatic-net.jpg 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-create-trigger-task-theautomatic-net-300x169.jpg 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/360;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You should get a box that pops up where you can select what dates \/ times you need your script to run. After you\u2019ve made your selections, you can go to the&nbsp;<strong>\u201cActions\u201d<\/strong>&nbsp;tab, where you\u2019ll create a new action. Clicking&nbsp;<strong>\u201cNew\u201d<\/strong>&nbsp;brings up the box below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"640\" height=\"360\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-create-action-1-task-theautomatic-net.jpg\" alt=\"\" class=\"wp-image-193021 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-create-action-1-task-theautomatic-net.jpg 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/07\/create-task-create-action-1-task-theautomatic-net-300x169.jpg 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/360;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">There\u2019s a couple ways you can add an action here. One, you can copy exactly what we did above to run an R script from the command line into the&nbsp;<strong>\u201cProgram\/Script\u201d<\/strong>&nbsp;box:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Rscript -e \u201csource(\u2018C:\/path\/to\/script\/some_code.R\u2019)\u201d<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Or two, you can type&nbsp;<strong>Rscript<\/strong>&nbsp;into this box, and put the rest of the line,&nbsp;<strong>-e \u201csource(\u2018C:\/path\/to\/script\/some_code.R\u2019)\u201d<\/strong>&nbsp;into the&nbsp;<strong>\u201cAdd Arguments (optional)\u201d<\/strong>&nbsp;box.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lastly, just press&nbsp;<strong>\u201cOK\u201d<\/strong>, and you\u2019re done!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Originally posted on <a href=\"https:\/\/theautomatic.net\/2018\/10\/31\/how-to-run-r-from-the-task-scheduler\/\">TheAutomatic.net<\/a> blog.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Similar to before, let\u2019s first cover how to R from the command line, as knowing this is useful for running it from the Task Scheduler.<\/p>\n","protected":false},"author":388,"featured_media":132255,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,343,338,342],"tags":[806,487,6591],"contributors-categories":[13695],"class_list":["post-193009","post","type-post","status-publish","format-standard","has-post-thumbnail","category-data-science","category-programing-languages","category-ibkr-quant-news","category-r-development","tag-data-science","tag-r","tag-rstats","contributors-categories-theautomatic-net"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Run R from the Task Scheduler | IBKR Quant<\/title>\n<meta name=\"description\" content=\"Similar to before, let\u2019s first cover how to R from the command line, as knowing this is useful for running it from the Task Scheduler.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/193009\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Run R from the Task Scheduler | IBKR Campus US\" \/>\n<meta property=\"og:description\" content=\"Similar to before, let\u2019s first cover how to R from the command line, as knowing this is useful for running it from the Task Scheduler.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-06T13:11:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/data-science-quant.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"563\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Andrew Treadway\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrew Treadway\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/how-to-run-r-from-the-task-scheduler\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/how-to-run-r-from-the-task-scheduler\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Andrew Treadway\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/d4018570a16fb867f1c08412fc9c64bc\"\n\t            },\n\t            \"headline\": \"How to Run R from the Task Scheduler\",\n\t            \"datePublished\": \"2023-07-06T13:11:15+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/how-to-run-r-from-the-task-scheduler\\\/\"\n\t            },\n\t            \"wordCount\": 802,\n\t            \"commentCount\": 0,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/how-to-run-r-from-the-task-scheduler\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/data-science-quant.jpg\",\n\t            \"keywords\": [\n\t                \"Data Science\",\n\t                \"R\",\n\t                \"rstats\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Quant\",\n\t                \"R Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"CommentAction\",\n\t                    \"name\": \"Comment\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/how-to-run-r-from-the-task-scheduler\\\/#respond\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/how-to-run-r-from-the-task-scheduler\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/how-to-run-r-from-the-task-scheduler\\\/\",\n\t            \"name\": \"How to Run R from the Task Scheduler | IBKR Campus US\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/how-to-run-r-from-the-task-scheduler\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/how-to-run-r-from-the-task-scheduler\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/data-science-quant.jpg\",\n\t            \"datePublished\": \"2023-07-06T13:11:15+00:00\",\n\t            \"description\": \"Similar to before, let\u2019s first cover how to R from the command line, as knowing this is useful for running it from the Task Scheduler.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/how-to-run-r-from-the-task-scheduler\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/how-to-run-r-from-the-task-scheduler\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/data-science-quant.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/data-science-quant.jpg\",\n\t            \"width\": 1000,\n\t            \"height\": 563,\n\t            \"caption\": \"Data Science\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/d4018570a16fb867f1c08412fc9c64bc\",\n\t            \"name\": \"Andrew Treadway\",\n\t            \"description\": \"Andrew Treadway currently works as a Senior Data Scientist, and has experience doing analytics, software automation, and ETL. He completed a master\u2019s degree in computer science \\\/ machine learning, and an undergraduate degree in pure mathematics. Connect with him on LinkedIn: https:\\\/\\\/www.linkedin.com\\\/in\\\/andrew-treadway-a3b19b103\\\/In addition to TheAutomatic.net blog, he also teaches in-person courses on Python and R through my NYC meetup: more details.\",\n\t            \"sameAs\": [\n\t                \"https:\\\/\\\/theautomatic.net\\\/about-me\\\/\"\n\t            ],\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/andrewtreadway\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Run R from the Task Scheduler | IBKR Quant","description":"Similar to before, let\u2019s first cover how to R from the command line, as knowing this is useful for running it from the Task Scheduler.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/193009\/","og_locale":"en_US","og_type":"article","og_title":"How to Run R from the Task Scheduler | IBKR Campus US","og_description":"Similar to before, let\u2019s first cover how to R from the command line, as knowing this is useful for running it from the Task Scheduler.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/","og_site_name":"IBKR Campus US","article_published_time":"2023-07-06T13:11:15+00:00","og_image":[{"width":1000,"height":563,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/data-science-quant.jpg","type":"image\/jpeg"}],"author":"Andrew Treadway","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andrew Treadway","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/"},"author":{"name":"Andrew Treadway","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/d4018570a16fb867f1c08412fc9c64bc"},"headline":"How to Run R from the Task Scheduler","datePublished":"2023-07-06T13:11:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/"},"wordCount":802,"commentCount":0,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/data-science-quant.jpg","keywords":["Data Science","R","rstats"],"articleSection":["Data Science","Programming Languages","Quant","R Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/","name":"How to Run R from the Task Scheduler | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/data-science-quant.jpg","datePublished":"2023-07-06T13:11:15+00:00","description":"Similar to before, let\u2019s first cover how to R from the command line, as knowing this is useful for running it from the Task Scheduler.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/how-to-run-r-from-the-task-scheduler\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/data-science-quant.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/data-science-quant.jpg","width":1000,"height":563,"caption":"Data Science"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/d4018570a16fb867f1c08412fc9c64bc","name":"Andrew Treadway","description":"Andrew Treadway currently works as a Senior Data Scientist, and has experience doing analytics, software automation, and ETL. He completed a master\u2019s degree in computer science \/ machine learning, and an undergraduate degree in pure mathematics. Connect with him on LinkedIn: https:\/\/www.linkedin.com\/in\/andrew-treadway-a3b19b103\/In addition to TheAutomatic.net blog, he also teaches in-person courses on Python and R through my NYC meetup: more details.","sameAs":["https:\/\/theautomatic.net\/about-me\/"],"url":"https:\/\/www.interactivebrokers.com\/campus\/author\/andrewtreadway\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/data-science-quant.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/193009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/388"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=193009"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/193009\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/132255"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=193009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=193009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=193009"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=193009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}