<input type="hidden" id="_wpnonce" name="_wpnonce" value="1fbfd39e73" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/2539" /><input type="hidden" id="_wpnonce" name="_wpnonce" value="1fbfd39e73" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/2539" />{"id":2539,"date":"2014-08-09T02:10:06","date_gmt":"2014-08-08T16:10:06","guid":{"rendered":"https:\/\/www.businesslegions.com\/blog\/?p=2539"},"modified":"2015-05-17T18:30:36","modified_gmt":"2015-05-17T08:30:36","slug":"create-cron-jobs-wamp","status":"publish","type":"post","link":"https:\/\/www.businesslegions.com\/blog\/2014\/08\/09\/create-cron-jobs-wamp\/","title":{"rendered":"How to create CRON jobs (Scheduled Tasks) in WAMP"},"content":{"rendered":"<!--CusAds0--><h2>What is WAMP?<\/h2>\n<p>WAMP is a Windows based web development platform that allows you to create web applications with Apache2, PHP and MySQL. It is basically a package that you run on your Windows OS and it will turn the device into a web server.<\/p>\n<h2>What is a CRON job?<\/h2>\n<p>Ok, so CRON jobs is something that you would find in Unix system. On a Windows based system it&#8217;s actually called Scheduled Tasks. I find Windows scheduled tasks to be much easier to setup than CRON jobs but they do exactly the same thing. They run a task in the background at a specified internal.<\/p>\n<p>In this post I will only detail the steps required to create a scheduled task for a web application running on WAMP.<\/p>\n<h2>ADD folder Path for PHP.exe<\/h2>\n<p>Click Start<\/p>\n<p>Right Click Computer &#8211; Properties<\/p>\n<p>Click Advanced system settings<\/p>\n<p><img decoding=\"async\" class=\"alignnone  wp-image-2564\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-System-Properties.png?strip=all\" alt=\"Windows 7 - System Properties\" width=\"323\" height=\"357\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-System-Properties.png?strip=all 374w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-System-Properties-272x300.png?strip=all 272w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-System-Properties.png?strip=all&amp;w=74 74w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-System-Properties.png?strip=all&amp;w=149 149w\" sizes=\"(max-width: 323px) 100vw, 323px\" \/><\/p>\n<p>Click Environment variables<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Environment-Variables.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-2565\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Environment-Variables-248x300.png?strip=all\" alt=\"Windows 7 - Environment Variables\" width=\"248\" height=\"300\" \/><\/a><\/p>\n<p>At the end of the line add:<\/p>\n<div id=\"wpshdo_1\" class=\"wp-synhighlighter-outer\"><div id=\"wpshdt_1\" class=\"wp-synhighlighter-expanded\"><table border=\"0\" width=\"100%\"><tr><td align=\"left\" width=\"80%\"><a name=\"#codesyntax_1\"><\/a><a id=\"wpshat_1\" class=\"wp-synhighlighter-title\" href=\"#codesyntax_1\"  onClick=\"javascript:wpsh_toggleBlock(1)\" title=\"Click to show\/hide code block\">Source code<\/a><\/td><td align=\"right\"><a href=\"#codesyntax_1\" onClick=\"javascript:wpsh_code(1)\" title=\"Show code only\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/code.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"#codesyntax_1\" onClick=\"javascript:wpsh_print(1)\" title=\"Print code\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/printer.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"https:\/\/www.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/About.html\" target=\"_blank\" title=\"Show plugin information\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/info.gif?strip=all&w=960\" \/><\/a>&nbsp;<\/td><\/tr><\/table><\/div><div id=\"wpshdi_1\" class=\"wp-synhighlighter-inner\" style=\"display: block;\"><pre class=\"php\" style=\"font-family:monospace;\">C<span class=\"sy0\">:<\/span>\\wamp\\bin\\php\\php5<span class=\"sy0\">.<\/span>5<span class=\"sy0\">.<\/span>12<\/pre><\/div><\/div>\n<p>Check to make sure the php.exe file exists in that folder. You may have a different folder name depending on the version of php.<\/p>\n<p>Make sure you include the semi quotation marks ;<\/p>\n<p>To verify to make sure it worked just open up the command prompt and\u00a0type<\/p>\n<div id=\"wpshdo_2\" class=\"wp-synhighlighter-outer\"><div id=\"wpshdt_2\" class=\"wp-synhighlighter-expanded\"><table border=\"0\" width=\"100%\"><tr><td align=\"left\" width=\"80%\"><a name=\"#codesyntax_2\"><\/a><a id=\"wpshat_2\" class=\"wp-synhighlighter-title\" href=\"#codesyntax_2\"  onClick=\"javascript:wpsh_toggleBlock(2)\" title=\"Click to show\/hide code block\">Source code<\/a><\/td><td align=\"right\"><a href=\"#codesyntax_2\" onClick=\"javascript:wpsh_code(2)\" title=\"Show code only\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/code.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"#codesyntax_2\" onClick=\"javascript:wpsh_print(2)\" title=\"Print code\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/printer.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"https:\/\/www.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/About.html\" target=\"_blank\" title=\"Show plugin information\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/info.gif?strip=all&w=960\" \/><\/a>&nbsp;<\/td><\/tr><\/table><\/div><div id=\"wpshdi_2\" class=\"wp-synhighlighter-inner\" style=\"display: block;\"><pre class=\"php\" style=\"font-family:monospace;\">set<\/pre><\/div><\/div>\n<p>This will display all your variables and you should see the php folder listed. Something like this:<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/cmd-set-command.exe_.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone  wp-image-2572\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/cmd-set-command.exe_.png?strip=all\" alt=\"cmd set command.exe\" width=\"434\" height=\"299\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/cmd-set-command.exe_.png?strip=all 868w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/cmd-set-command.exe_-300x206.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/cmd-set-command.exe_.png?strip=all&amp;w=173 173w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/cmd-set-command.exe_.png?strip=all&amp;w=520 520w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/cmd-set-command.exe_.png?strip=all&amp;w=694 694w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/a><\/p>\n<h2>BATCH FILE<\/h2>\n<p>Create a batch file (open up a text editor like notepad and make sure you save the file as cron.bat. If the filename is cron.bat.txt then this is not a batch file)<\/p>\n<div id=\"wpshdo_3\" class=\"wp-synhighlighter-outer\"><div id=\"wpshdt_3\" class=\"wp-synhighlighter-expanded\"><table border=\"0\" width=\"100%\"><tr><td align=\"left\" width=\"80%\"><a name=\"#codesyntax_3\"><\/a><a id=\"wpshat_3\" class=\"wp-synhighlighter-title\" href=\"#codesyntax_3\"  onClick=\"javascript:wpsh_toggleBlock(3)\" title=\"Click to show\/hide code block\">Source code<\/a><\/td><td align=\"right\"><a href=\"#codesyntax_3\" onClick=\"javascript:wpsh_code(3)\" title=\"Show code only\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/code.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"#codesyntax_3\" onClick=\"javascript:wpsh_print(3)\" title=\"Print code\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/printer.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"https:\/\/www.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/About.html\" target=\"_blank\" title=\"Show plugin information\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/info.gif?strip=all&w=960\" \/><\/a>&nbsp;<\/td><\/tr><\/table><\/div><div id=\"wpshdi_3\" class=\"wp-synhighlighter-inner\" style=\"display: block;\"><pre class=\"php\" style=\"font-family:monospace;\"><span class=\"sy0\">@<\/span><span class=\"kw1\">echo<\/span> off\nREM <span class=\"sy0\">-----<\/span>\nREM Created By Business Legions www<span class=\"sy0\">.<\/span>businesslegions<span class=\"sy0\">.<\/span>com<span class=\"sy0\">\/<\/span>blog\nREM Cron job in WAMP\nphp <span class=\"sy0\">-<\/span>f C<span class=\"sy0\">:<\/span>\\wamp\\www\\abc<span class=\"sy0\">.<\/span>php<\/pre><\/div><\/div>\n<p>&nbsp;<\/p>\n<p>You can also download the attached example.<\/p>\n<div class='w3eden'><!-- WPDM Link Template: Default Template -->\n\n<div class=\"link-template-default card mb-2\">\n    <div class=\"card-body\">\n        <div class=\"media\">\n            <div class=\"mr-3 img-48\"><img decoding=\"async\" class=\"wpdm_icon\" alt=\"Icon\"   src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/download-manager\/assets\/file-type-icons\/download2.png?strip=all&w=960\" \/><\/div>\n            <div class=\"media-body\">\n                <h3 class=\"package-title\"><a href='https:\/\/www.businesslegions.com\/blog\/download\/cron-batch-file-for-wamp\/'>Cron Batch File for WAMP<\/a><\/h3>\n                <div class=\"text-muted text-small\"><i class=\"fas fa-copy\"><\/i> 1 file(s) <i class=\"fas fa-hdd ml-3\"><\/i> 0.13 KB<\/div>\n            <\/div>\n            <div class=\"ml-3\">\n                <a class='wpdm-download-link download-on-click btn btn-primary ' rel='nofollow' href='#' data-downloadurl=\"https:\/\/www.businesslegions.com\/blog\/download\/cron-batch-file-for-wamp\/?wpdmdl=3395&refresh=6a04e3c92cb051778705353\">Download<\/a>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n<\/div>\n<p>To run a specific page to trigger certain events use the following syntax<\/p>\n<p>For executing a file:<\/p>\n<p>php -f C:\\wamp\\www\\abc.php<\/p>\n<p>For downloading a file\u00a0you will need to get the windows based version of wget.<\/p>\n<p>http:\/\/sourceforge.net\/projects\/gnuwin32\/postdownload?source=dlp<\/p>\n<p>Install the software and then add the path:<\/p>\n<p>C:\\Program Files (x86)\\GnuWin32\\bin<\/p>\n<p>To the environment variables &#8211; see above steps<\/p>\n<p>For executing a website:<\/p>\n<p>all you need to do is add the program script<\/p>\n<p>&#8220;C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe&#8221;<\/p><!--CusAds0-->\n<p>&nbsp;<\/p>\n<h2>CREATE SCHEDULED TASK<\/h2>\n<p>Click Start<\/p>\n<p>Right Click on Computer and select Manage<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2563\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Manage.png?strip=all\" alt=\"Windows 7 - Manage\" width=\"277\" height=\"250\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Manage.png?strip=all 277w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Manage.png?strip=all&amp;w=55 55w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Manage.png?strip=all&amp;w=110 110w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Manage.png?strip=all&amp;w=166 166w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Manage.png?strip=all&amp;w=221 221w\" sizes=\"(max-width: 277px) 100vw, 277px\" \/><\/p>\n<p>In System Tools, Expand Task Scheduler \u00a0and Click on Task Scheduler Library. Create a new task:<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-General1.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone  wp-image-2568\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-General1.png?strip=all\" alt=\"Windows 7 - Task Scheduler - General\" width=\"588\" height=\"419\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-General1.png?strip=all 900w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-General1-300x214.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-General1.png?strip=all&amp;w=180 180w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-General1.png?strip=all&amp;w=360 360w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-General1.png?strip=all&amp;w=540 540w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-General1.png?strip=all&amp;w=720 720w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-General1.png?strip=all&amp;w=450 450w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><\/a><\/p>\n<p>Set the Trigger settings eg frequency.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Trigger.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone wp-image-2561 \" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Trigger.png?strip=all\" alt=\"Windows 7 - Task Scheduler - Trigger\" width=\"597\" height=\"424\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Trigger.png?strip=all 893w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Trigger-300x213.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Trigger.png?strip=all&amp;w=178 178w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Trigger.png?strip=all&amp;w=357 357w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Trigger.png?strip=all&amp;w=535 535w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Trigger.png?strip=all&amp;w=714 714w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Trigger.png?strip=all&amp;w=450 450w\" sizes=\"(max-width: 597px) 100vw, 597px\" \/><\/a><\/p>\n<p>Set the action. In this particular example browse to the cron.bat file.<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-New-Action.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-full wp-image-2569\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-New-Action.png?strip=all\" alt=\"Windows 7 - Task Scheduler - New Action\" width=\"499\" height=\"529\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-New-Action.png?strip=all 499w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-New-Action-283x300.png?strip=all 283w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-New-Action.png?strip=all&amp;w=99 99w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-New-Action.png?strip=all&amp;w=199 199w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-New-Action.png?strip=all&amp;w=399 399w\" sizes=\"(max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The conditions and settings tabs are pretty much optional. Click ok and then the task will run based on the frequency you set.<\/p>\n<p>It should say running next to the task name.<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Running.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-full wp-image-2570\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Running.png?strip=all\" alt=\"Windows 7 - Task Scheduler - Running\" width=\"176\" height=\"167\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Running.png?strip=all 176w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2014\/08\/Windows-7-Task-Scheduler-Running.png?strip=all&amp;w=70 70w\" sizes=\"(max-width: 176px) 100vw, 176px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>That&#8217;s it. The cron job will now run.<\/p>\n<h2>SILENT BAT<\/h2>\n<p>UPDATE: If you don&#8217;t want to have the Command window popup you can run the batch file within a Visual Basic script. To do this follow these steps:<\/p>\n<p>Create a new file called cron.vbs and put in the following text. Replace the\u00a0C:\\Scheduled Jobs\\cron.bat with the location of your batch file.<\/p>\n<pre style=\"color: #000000;\"><code><div id=\"wpshdo_4\" class=\"wp-synhighlighter-outer\"><div id=\"wpshdt_4\" class=\"wp-synhighlighter-expanded\"><table border=\"0\" width=\"100%\"><tr><td align=\"left\" width=\"80%\"><a name=\"#codesyntax_4\"><\/a><a id=\"wpshat_4\" class=\"wp-synhighlighter-title\" href=\"#codesyntax_4\"  onClick=\"javascript:wpsh_toggleBlock(4)\" title=\"Click to show\/hide code block\">Source code<\/a><\/td><td align=\"right\"><a href=\"#codesyntax_4\" onClick=\"javascript:wpsh_code(4)\" title=\"Show code only\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/code.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"#codesyntax_4\" onClick=\"javascript:wpsh_print(4)\" title=\"Print code\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/printer.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"https:\/\/www.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/About.html\" target=\"_blank\" title=\"Show plugin information\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/info.gif?strip=all&w=960\" \/><\/a>&nbsp;<\/td><\/tr><\/table><\/div><div id=\"wpshdi_4\" class=\"wp-synhighlighter-inner\" style=\"display: block;\"><pre class=\"php\" style=\"font-family:monospace;\">Dim WinScriptHost\nSet WinScriptHost <span class=\"sy0\">=<\/span> CreateObject<span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;WScript.Shell&quot;<\/span><span class=\"br0\">&#41;<\/span>\nWinScriptHost<span class=\"sy0\">.<\/span>Run <a href=\"http:\/\/www.php.net\/chr\"><span class=\"kw3\">Chr<\/span><\/a><span class=\"br0\">&#40;<\/span><span class=\"nu0\">34<\/span><span class=\"br0\">&#41;<\/span> <span class=\"sy0\">&amp;<\/span> <span class=\"st0\">&quot;C:\\Scheduled Jobs\\cron.bat&quot;<\/span> <span class=\"sy0\">&amp;<\/span> <a href=\"http:\/\/www.php.net\/chr\"><span class=\"kw3\">Chr<\/span><\/a><span class=\"br0\">&#40;<\/span><span class=\"nu0\">34<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">,<\/span> <span class=\"nu0\">0<\/span>\nSet WinScriptHost <span class=\"sy0\">=<\/span> Nothing<\/pre><\/div><\/div><\/code><\/pre>\n<p>Then in the task scheduler for the Action, select the file cron.vbs instead of the cron.bat file. This will run the batch file silently.<\/p>\n<p>Below is the cron.vbs file.<\/p>\n<div class='w3eden'><!-- WPDM Link Template: Default Template -->\n\n<div class=\"link-template-default card mb-2\">\n    <div class=\"card-body\">\n        <div class=\"media\">\n            <div class=\"mr-3 img-48\"><img decoding=\"async\" class=\"wpdm_icon\" alt=\"Icon\" src=\"data:image\/svg+xml;base64,CiAgICAgICAgICAgIDxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNDAgNDAiPgogICAgICAgICAgICAgICAgPGRlZnM+CiAgICAgICAgICAgICAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkaWVudCIgeDE9IjAiIHkxPSIwIiB4Mj0iMCIgeTI9IjEiPgogICAgICAgICAgICAgICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMjY5ZGVmIiBvZmZzZXQ9IjAiLz4KICAgICAgICAgICAgICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzI2YmRlZiIgb2Zmc2V0PSIxIi8+CiAgICAgICAgICAgICAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICAgICAgICAgIDwvZGVmcz4KICAgICAgICAgICAgICAgIDxnPgogICAgICAgICAgICAgICAgICAgIDxyZWN0IGZpbGw9InVybCgjZ3JhZGllbnQpIiB4PSIwIiB5PSIwIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSIzIiByeT0iMyIvPgogICAgICAgICAgICAgICAgICAgIDx0ZXh0IHg9IjUiIHk9IjE5IiBmb250LWZhbWlseT0iQXJpYWwsIEhlbHZldGljYSwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxM3B4IiBsZXR0ZXItc3BhY2luZz0iMSIgZmlsbD0iI0ZGRkZGRiI+CiAgICAgICAgICAgICAgICAgICAgICAgIDx0c3Bhbj5WQlM8L3RzcGFuPgogICAgICAgICAgICAgICAgICAgICAgICA8dHNwYW4geD0iNiIgeT0iMjgiPl88L3RzcGFuPgogICAgICAgICAgICAgICAgICAgIDwvdGV4dD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9zdmc+CgoJCQk=\" \/><\/div>\n            <div class=\"media-body\">\n                <h3 class=\"package-title\"><a href='https:\/\/www.businesslegions.com\/blog\/download\/cron-vbs-file\/'>CRON VBS FILE<\/a><\/h3>\n                <div class=\"text-muted text-small\"><i class=\"fas fa-copy\"><\/i> 1 file(s) <i class=\"fas fa-hdd ml-3\"><\/i> 0.16 KB<\/div>\n            <\/div>\n            <div class=\"ml-3\">\n                <a class='wpdm-download-link download-on-click btn btn-primary ' rel='nofollow' href='#' data-downloadurl=\"https:\/\/www.businesslegions.com\/blog\/download\/cron-vbs-file\/?wpdmdl=3397&refresh=6a04e3c931f9a1778705353\">Download<\/a>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n<\/div>\n<div class=\"lt-box\" style=\"border:1px solid #22a89f\"><div class=\"lt-box-title\" style=\"background-color:#2bd2c7;border-top:1px solid #aaede9;text-shadow:1px 1px 0 #0d3f3c\">FEEDBACK<\/div><div class=\"lt-box-content\">I hope this has helped some of you. If you need any further help then please let me know.<\/div><\/div>\n<div class=\"lt-box\" style=\"border:1px solid #1d6a9e\"><div class=\"lt-box-title\" style=\"background-color:#2485C6;border-top:1px solid #a7cee8;text-shadow:1px 1px 0 #0b283b\">DO YOU LIKE WHAT YOU'VE READ?<\/div><div class=\"lt-box-content\">Join our subscription list and receive our content right in your mailbox. If you like to receive some Great deals our Freebies then subscribe now!\r\n\r\n<p><div class=\"tnp tnp-subscription \">\n<form method=\"post\" action=\"https:\/\/www.businesslegions.com\/blog\/wp-admin\/admin-ajax.php?action=tnp&amp;na=s\">\n<input type=\"hidden\" name=\"nlang\" value=\"\">\n<div class=\"tnp-field tnp-field-firstname\"><label for=\"tnp-1\">Name<\/label>\n<input class=\"tnp-name\" type=\"text\" name=\"nn\" id=\"tnp-1\" value=\"\" placeholder=\"\"><\/div>\n<div class=\"tnp-field tnp-field-email\"><label for=\"tnp-2\">Email<\/label>\n<input class=\"tnp-email\" type=\"email\" name=\"ne\" id=\"tnp-2\" value=\"\" placeholder=\"\" required><\/div>\n<div class=\"tnp-field tnp-field-button\" style=\"text-align: left\"><input class=\"tnp-submit\" type=\"submit\" value=\"Subscribe\" style=\"\">\n<\/div>\n<\/form>\n<\/div>\n<\/p>\r\n\r\n<\/div><\/div><!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>What is WAMP? WAMP is a Windows based web development platform that allows you to create web applications with Apache2, PHP and MySQL. It is basically a package that you run on your Windows OS and it will turn the device into a web server. What is a CRON job? Ok, so CRON jobs is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2561,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[1652,1002,593,1609],"class_list":["post-2539","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-cron","tag-php","tag-setup","tag-wamp"],"_links":{"self":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/2539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/comments?post=2539"}],"version-history":[{"count":12,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/2539\/revisions"}],"predecessor-version":[{"id":3400,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/2539\/revisions\/3400"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media\/2561"}],"wp:attachment":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media?parent=2539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/categories?post=2539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/tags?post=2539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}