Last updated March 17, 2016. Created on September 18, 2005.
Edited by mr.ashishjain, Francewhoa, zk_deng, mgifford. Log in to edit this page.

To setup a Windows machine to run cron.php at a specific time follow the specific instructions below. This can be useful if you are not familiar with Linux/Unix, or if your web host does not offer the ability to run cron jobs; you can run them remotely from your own computer.

Note: These instructions were written for Windows XP but should be similar in other versions of Windows.

Creating a Scheduled Task

  1. Open Scheduler
  2. Go to Start > Programs > Accessories > System Tools > Scheduled Tasks
  3. Double-click Add Scheduled Task
  4. The Scheduled Task Wizard will appear. Click Next.
  5. Select the program to run. Choose your browser from the list (for example, Internet Explorer or Mozilla Firefox). Click Next.
  6. Give the task a Name, such as Drupal Cron Job, and choose the Frequency with which to perform the task (for example, Daily)). Click Next.
  7. Choose specific date and time options (this step will vary, depending on the option selected in the previous step). When finished, click Next.
  8. Enter your password if prompted. Change the username if required (for example, you'd like the task to run under a user with fewer privileges security reasons). Click Next.
  9. On the final page, select the checkbox Open advanced properties for this task when I click Finish and click Finish.

Configuring the task

  1. Go to the task's setting page either by checking the checkbox at the end of the last step, or by double-clicking on the task.
  2. In the Run box, after the text that is there now (for example, C:\PROGRA~1\MOZILL~1\firefox.exe), enter a space and then type the address to your website's cron.php page in double quotations (for example, C:\PROGRA~1\MOZILL~1\firefox.exe
  3. To set a frequency more often than Daily (for example, hourly), click the Schedule tab, then click Advanced. Here you can set options such as Repeat task, every 1 hour for 23 hours. Click Ok when finished.
  4. Change the start time on the task to one minute from the current time. This will allow you to test the task and make sure that it is working.
  5. When all settings have been configured to your liking, click Apply and OK (note: you may be prompted for your password)

Command-line version

Another way to perform the above commands is by using the schtasks (or at in Windows 2000) command from the command line. To duplicate the example above, which runs Firefox hourly to execute, open a command prompt (Start > Programs > Accessories > Command Prompt) and enter:

schtasks /create /tn "Drupal Cron Job" /tr "C:\PROGRA~1\MOZILL~1\firefox.exe" /sc hourly

Enter your password if prompted.

Using wget for Windows to run cron

If for whatever reason you'd rather not deal with a browser window popping up on the machine, you can use wget, the Windows port of which works more or less the same as it does in UNIX. curl and lynx also have windows ports but wget is probably the easiest to set up and use.

Grab a copy of wget from your choice of either the author's site or from SourceForge. Install it to the location of your choice.

Follow the steps for Creating A Scheduled Task above, except select wget.exe as the program to run (you may need to click the Browse button to locate it if you installed from a .zip file, for example). When you get to the Advanced Properties dialog, paste in the following after the program path:

-O - -q -t 1

Adjust the rest of the options as described above and test it.

Using curl with cmd.exe in Windows 7 (or Vista) with Task Scheduler

  • Start Computer Management (Windows Key, right-click Computer, select Manage...)
  • In right column, select Create Job...
  • Fill in General tab.
  • Under Triggers tab, select New..., then set the desired schedule, with repeat set in Advanced Options.
  • Under Actions tab, select Start a program, the program is CMD.EXE. For the optional argument, enter /C "curl [link provided on the status report page]".

If you have already installed mysysgit, curl is already present and in the path.

Under Windows 7 (or Vista), using schtasks and curl

Assuming you have already installed mysysgit as described above...
Run cmd.exe as Administrator, then enter the command:

C:\Windows\system32>schtasks /create /sc HOURLY /tn DevCron /tr "cmd.exe 'curl -
-silent --compressed http://[[hostname]]/cron.php?cron_key=VOYz8P63mnytd0mHVwFE
1jrXfRfNYU9KZiKB1Ou1Rh8'" /ru SYSTEM

where [[hostname]] is the TLDN to the document root, /tn is the task name desired (here it's DevCron).

The above command yields a job that will run every hour, indefinitely.

Using external webcron service

If anyone finds above methods hard to manage, an easier way to schedule repeatedly executed tasks is using webcron service (e. g. EasyCron). Just via a browser, you can set up a webcron and it will periodically trigger your script.

Looking for support? Visit the forums, or join #drupal-support in IRC.


jbridges’s picture

Scheduled Tasks converts the forward slashes of the URL into back slashes if they're placed in the double quotes (at least in Windows Server 2003). The URL needs to be placed outside the quotes:

emission’s picture

There are several cron implementations available for Windows. I've used nnCron ( ) with great results. The Lite edition is free and runs as a service.

wget is also available for Windows, at

i.chris.jacob’s picture

Thank you "emission" for posting these tools.

Some notes on using them:
Once installed nnCron should show up in your system try icons
Right click on the icon -> New Task
Enter a Task Name
On the 'Time and Options' tab set your time schedule (I suggest Minutely for testing)
On the 'Action' tab select 'Run application or open document'
- Enter in 'Application or document path': C:\Program Files\GnuWin32\bin\wget.exe -O - -q -t 1
Tick 'Prompt for confirmation' (for testing anyway)
Click OK

In less than 1 minute you should be prompted to run the task ;-)

big67’s picture

On windows I normally use the MoodleCron_setup.exe package. It is a cron tool developed for the MOODLE open source elearning cms, but it will run any cron.php script it is configured to.

It is a tiny executable that will install on your server a service (4K ram footprint) that can be configured during the setup process or later by editing, adding, removing the entries in the windows registry:
basically after setup open a command windows, type regedt32, press enter, the registry editor pops up
in the registry editor look for "Hkey_local_machine > software > moodlecron > sites
each key you find there is the string of a "" that will be called by the service.

Moodlecron will install under start > programs a readme.txt with the detailed configuration instructions.

MoodleCron_setup.exe can be found here:

Benefits: it is tiny, it can run multiple crons on the same server, it is a windows service so you can configure it to start automatically at windows startup and forget about it.

kenljr’s picture

This is the setup I use and it works very well. I use a slower computer for my server and every bit of resources I can keep free is important. So when I use the above method it keeps the browser window open and I'd prefer it didn't. I created a second scheduled event that closes the browser window. There are two ways of doing it if you have XP Pro but only one with XP home. The way that will work with both is as follows...

  • New Scheduled Task
  • Run: cmd /c tskill iexplore /a
  • Start In: C:\WINDOWS\system32

    Now XP Pro ONLY

  • New Scheduled Task
  • Run: cmd /c taskkill /F /IM iexplore.exe
  • Start In: C:\WINDOWS\system32

    now you can set the event one minute after you have cron run and it will close the window too.

    The Pro only way is a better more powerfull version of the tskill found in XP Home but for the propose of this use either should work just fine.
    NOTE: Does not work with Firefox because of Firefox's attempt to restore sessions after being killed

  • TheLion’s picture

    Use wget Win32 port (you can find it on or look for "wget win32 download" in Google)
    small command line utility.

    So command line for Scheduled task will be
    wget.exe -q -O nul http://drupal/cron.php

    You can add full path before wget.exe and surround it with quotes if need.

    JDonofrio’s picture

    thanks for the wget tip. It works great.

    snohio’s picture

    Instead of "killing" the task, you can also set up the original task to stop it. On the Setting tab, check the Stop the task if it runs for: 0 hour(s) xx minute(s). I would suggest letting it run for at least 10 minutes, depending on how many tasks it has to perform and how long it runs.

    I run a five different non-commercial Drupal sites on my server and I have a job for each every half hour and closing after 15 minutes. You can imagine how many browser windows it would leave open after a week. Sometimes I don't check the console for a month..

    snorkers’s picture

    I've been playing around with Cron a lot on a Windows/Apache server and found that Firefox (v3) wouldn't shut down after a Cron run, and wouldn't open another instance of Firefox an hour later... so tried IE7 which seems to work fine. Not sure why - but I'm just going to leave it ticking away

    lsabug’s picture

    thanks, good idea

    bornyesterday’s picture

    Thanks snohio - I'll do that in my installation.

    natere2’s picture

    be careful as this is very tricky...

    seems that on my box the line to successfully run cron in Firefox is

    "C:\Program Files\Mozilla Firefox\firefox.exe" "localhost\cron.php"

    Obviously mine is a local server and you need to change localhost to whatever your own domain might be....

    I posted this as in the page above I got a tad confused as I didnt see the part about the quotes! Xp



    Doubt.It’s picture

    Brilliant. Thanks Nate.

    bornyesterday’s picture

    The quotes are needed, Nate, due to the spacing.

    quotes needed: "C:\Program Files\Mozilla Firefox\firefox.exe" "localhost\cron.php"
    quotes not needed: C:\PROGRA~1\MOZILL~1\firefox.exe http://localhost/cron.php

    The slashes might goof things up too...

    ahcolus’s picture

    To avoid using browsers to open the cron.php page (or any other HTTP page) you must create a small script in JavaScript (formally JScript) and run it as a Windows scheduler job as explained in this article. The script use the COM WinHttp object, so perhaps it works only if you have installed Internet Explorer 7 (not tested with previous versions).

    function HTTPRequest (sURL)
        var sResult = "";
            // Create the WinHTTPRequest ActiveX Object.
            var oWinHttpReq = new ActiveXObject ("WinHttp.WinHttpRequest.5.1");
            //  Create an HTTP request.
            var oTemp = oWinHttpReq.Open ("GET", sURL, false);
            //  Send the HTTP request.
            oWinHttpReq.Send ();
        catch (oError)
            sResult = "WinHTTP returned error: " + 
                       (oError.number & 0xFFFF).toString () + "\n" +
        //  Return the response text.
        return sResult;
    // Main
    var sURL = "http://www.mysite.local/cron.php";
    var sError = HTTPRequest (sURL);
    if (sError != "")
        WScript.echo ("Error on URL: " + sURL + "\n\n" + sError);

    If you have more than one site to update you can put them all in the same script

        // Main
        var sError, s;
        var sURL = "http://www.site_one.local/cron.php";
        s = HTTPRequest (sURL);
        if (s != "")
            sError += "Error on URL: " + sURL + "\n" + s + "\n\n";
        sURL = "http://www.site_two.local/cron.php";
        s = HTTPRequest (sURL);
        if (s != "")
            sError += "Error on URL: " + sURL + "\n" + s + "\n\n";
        if (sError != "")
            WScript.echo (sError);

    that's all folks

    Kisama’s picture

    I'm afraid I cannot get your script to run. I receive an error:

    Script: C:\etctetc\test.js
    Line: 1
    Char: 13
    Error: Expected ';'
    Code: 800A03EC
    Source: Microsoft JScript compilation error

    Mathijs Koenraadt’s picture

    This opens the JS in my Aptana Studio... How to run the JS?

    ahcolus’s picture

    Aptana (and other multiplatform programs) modify the file association for some file types. The default Windows behaviour for scripting host files are

    cscript [options] script_file_path


    wscript [options] script_file_path

    The cscript command run WSH in console, it is useful to run scripts if you have a console already open, otherwise it opens a console and run it, closing console at exit. The wscript command run WSH in UI mode, all messages displayed with WScript.Echo are wrapped in a Windows MessageBox.
    For other command switches type cscript /? in a command line console (or take a look at the windows help system).

    rpmskret’s picture

    This set up will leave the browser open, at least for 30 min. You have to do one for each site. On the good side it's easy and works.

    For Vista go to task scheduler and 'Create Task'.
    In the dialog window use these tabs...

    • trigger - add ->
      set up schedules time(s)
      --advanced settings: stop if runs > 30min
    • actions - add ->
      Program/script: "C:\Program Files\Internet Explorer\iexplore.exe"
      Add args: (don't use quotes)
    • settings: run as soon as possible if missed
    lucacerone’s picture

    Hi, I found a better way to schedule running cron.php
    without having firefox open (also becaus it only works if user is logged
    on, not at night for example).

    I have XAMPP webserver installed on Vista.
    To schedule the job it is as easy as to schedule a job
    using Task Schedule tool.

    Instead of launching firefox,
    I run the file "C:\xampp\php\php.exe"
    with arguments cron.php,
    and the important thing is to make it run in the directory
    where the cron.php file is located (in my case C:\xampp\htdocs )

    This would allow php to correctly execute cron.php at scheduled times,
    all in background, without displaying a new browser window or whatever.

    Hope it can help ^_^

    Canadaka’s picture

    This is the way I've always done cron like tasks in windows, works well. I also pass an argument to php.exe specifiying a different php.ini I have setup specific for command line tasks, giving them more execution time and so forth.

    I have one setup for the drupal cron, it appears to work. The problem is the "cron_last" variable in the database doens't seem to be updated when I run cron.php from the command line. So the "Last run..." on the "Status report" is never updated.

    Also when I run cron.php from the command line it takes WAY longer to complete compared to when I run it from the browser. It runs for over 5 minutes eating up 25% CPU. It also often gets the "Maximum execution time of 240 seconds exceeded". I disabled the cacherouter code in settings.php and the cron.php executions in about 20 seconds with no error.

    So i think i need to find a way to disable cachrouter when its cron.php being executed.

    duane’s picture

    Here's how I solved this under XP Pro. I grabbed Wget for Windows from . For those who don't know, wget is a 'nix command line file fetcher that uses either the http or ftp protocol. The file specified on the command line is written to a local file, rather than being displayed in a browser.

    I recommend you get "Complete Package (except sources)." This will get you the documentation, which is handy, along with the binary. It is packaged as an ms executable. I ran it and accept the default destination (C:\Program Files\GnuWin32\bin).

    Once I did this, I went to "My Computer" in the Start menu and right clicked on it, then selected "Properties." On the "Advanced" tab, I clicked the "Environment Variables" button.

    In the "System Variables" window at the bottom of the window, I scrolled down to find the "Path" variable and clicked on it to highlight it, and then clicked the "Edit" button. I went to the "Variable Value" input box and went to the end of it. I then added the following to the end of the string, being careful not to delete anything that was already in there -- note the semicolons, they're important:

    ;C:\Program Files\GnuWin32\bin;

    Then I opened a dos console (Start button, "Run...", then type "cmd" in the "Open:" input box) and input the following command from whereever the console opened up (it doesn't matter):

    wget -O nul http://localhost/cron.php

    The -O is "dash capital O", not "dash zero". Yes, the capital O is important. Lowercase o won't work.

    A moderate amount of output ensued into the console window, ending with the notation that file nul had been created. Actually, nul is the MS-DOS equivalent of /dev/null, so what had really happened is that the output had been swallowed. I checked the Drupal recent events log and determined that the cron job had indeed run successfully.

    Next, I wrote an MS-DOS batch file, so that I wouldn't be bothered with passing parameters through Scheduled Tasks:

    @echo off
    rem wgetCronPhp.bat
    rem Fetches cron.php from the localhost root and writes it to the nul device.
    wget -O nul http://localhost/cron.php

    I stored the file in a utilities folder on my hard drive, and double clicked on the batch file to run it. I was satisfied to see that the output was as before, in the manual test. The only problem was that the ugly black console window popped up. I decided to suppress it. I right-clicked on the batch file and selected "Properties", and noticed that there was no way to have the program run minimized.

    I then closed the Properties window and right-clicked on the batch file again. This time I selected "Send To > Desktop (create shortcut)".

    I went to the desktop and double-clicked on the shortcut. The results were the same as double-clicking on the batch file itself. Same output, same ugly black box.

    I then right-clicked on the shortcut. I again selected the "Properties" item, and was gratified to see that several more tabs were available here on the Shortcut.

    I selected the "Shortcut" tab from the Properties window and located the "Run" pulldown box. I selected "Minimized" from this pulldown and OK'd out. I again ran the shortcut file, this time while looking at the Windows taskbar. The batch file icon came up in the taskbar for several seconds, and then disappeared. Beautiful.

    I then moved the shortcut to the directory above my web root, and proceeded to enter it into Scheduled Tasks as outlined in the main article. Now cron runs regularly, and I'm not bothered by anything popping up on the screen.

    dagv’s picture

    Thx for the tip snohio, worked great...

    ZeekDaGeek’s picture

    If you are running the cron on the server itself why not use

    schtasks /create /tn "Drupal Cron Job" /tr "php -f '{path-to-cron}/cron.php'" /sc hourly

    snohio’s picture

    We've all been thinking outside of the box.. Yeah, why not use php to execute. Thanks, I'm building one batch job now to run all of them at once.

    wimvds’s picture

    If you're using Windows authentication using mod_auth_sspi and would like to schedule updates with cron.php, you should disable the authentication for the cron script.

    The following snippet shows how to do this :

    <Directory "D:/Data/www/drupal/htdocs">
        AllowOverride All
        Order allow,deny
        Allow from all
        AuthType SSPI
        SSPIAuthoritative On
        SSPIAuth On
        SSPIOfferBasic Off
        SSPIBasicPreferred Off
        SSPIPerRequestAuth On
        require valid-user
        <FilesMatch "(cron\.php)$">
            Satisfy Any
            Order allow,deny
            Allow from all
            Deny from none

    Instead of doing the former you could also use the --http-user='domain\user' and --http-password=pwd switches of wget, but I don't like accounts with fixed passwords or having to change the cron script every time the password changes :p.

    bitsantos’s picture

    I'm a bit surprised that using hasn't been suggested yet. Although its extension is .sh, it's actually a PHP script. If you just run it through the PHP binary, you can bypass having to load your web server. The command would be:

    php -d memory_limit=512M -d max_execution_time=300 "[path_to_drupal]\scripts\ --root [path_to_drupal] http://default/cron.php"

    Adding that to the task scheduler should be easier and more efficient than having to get wget or making a browser load the page.

    Found this option here:

    bitsantos’s picture

    It should be noted that Drupal cron has a hard-coded time limit of 240 seconds. This can be found (and edited) in the drupal_cron_run() function in

    Sunshiney’s picture

    But that while runs cron.php from doc root, it won't run cron.php's associated with each site in a multi-site config. Great for a single site set-up, though.

    pbyhistorian’s picture

    I'm not too keen on the scheduled-browser solution and didn't want to install yet another single-purpose utility (wget), so I turned to Java. The code below runs cron.php on all of the sites specified. (Java programmers will scream about my coding conventions but for those who are new to Java, take it from me: this is how Java code should look.)

    package com.example;
    public class DrupalCron
    /*  ************************************************************************* */
    /*  main                                                                      */
    /*  ************************************************************************* */
    /** This method is the entry point into this class; it makes a single HTTP
        request for the /cron.php page on the Drupal sites specified.  Creating a
        scheduled task on Windows to invoke this method periodically simulates the
        cron task on Linux/Unix machines.
        @param  s__Arguments    Any command-line arguments provided (all ignored) */
    /*  ------------------------------------------------------------------------- */
        public static void main( String[] s__Arguments )
        {   String[] s__Urls;
    //      ------------------------------------------------------------------------
    //      Include the sites on which to invoke cron.php.  Specify the entire URL
    //      to the page; no assumptions are made as to how you might have installed
    //      your site(s).
    //      Note that setting the URL to ".../run-cron" (as used in Drupal's status
    //      report page) does not update the RSS feeds.
    //      ------------------------------------------------------------------------
            s__Urls = new String[]
            {   "http://localhost/cron.php",
    //      ------------------------------------------------------------------------
    //      Make a single HTTP request to each URL. 		
    //      ------------------------------------------------------------------------
            for( int i__UrlIndex = 0; i__UrlIndex < s__Urls.length; i__UrlIndex++ )
            {	RunCron( s__Urls[i__UrlIndex] );
    /*  ************************************************************************* */
    /*  RunCron                                                                   */
    /*  ************************************************************************* */
    /** This method establishes an HTTP connection to the supplied url and creates a
        reader for the connection; that's enough to invoke cron.php.
        @param  s__Url  the full URL to the cron.php page                         */
    /*  ------------------------------------------------------------------------- */
         private static void RunCron( String s__Url )
        {   HttpURLConnection hc_Cron = null;
            URL               ul_Cron = null;
    //      ------------------------------------------------------------------------
    //          Configure the HTTP connection and make contact.  Give up after 20
    //          seconds.
    //      ------------------------------------------------------------------------
            {   ul_Cron = new URL( s__Url );
                hc_Cron = (HttpURLConnection) ul_Cron.openConnection();
                hc_Cron.setReadTimeout( 20000 );
                hc_Cron.setRequestMethod( "GET" );
    //          --------------------------------------------------------------------
    //          Read the page from the server.  Getting the input stream is all that
    //          is necessary to cause cron.php to run.  In my Drupal installation,
    //          aggregator causes problem entries in the Application event log,
    //          stating that PHP 5.2.9 cannot find the description for Event 3; this
    //          occurs even when clicking the "run cron manually" link.
    //          --------------------------------------------------------------------
                new InputStreamReader( hc_Cron.getInputStream() );
            } catch( Exception ex_Whatever )
    //      ------------------------------------------------------------------------
    //          We do so little, it's not worth handling each type of Exception
    //          individually.
    //      ------------------------------------------------------------------------
            {   ex_Whatever.printStackTrace();
            } finally
    //      ------------------------------------------------------------------------
    //          Close the HTTP connection.
    //      ------------------------------------------------------------------------
            {   hc_Cron.disconnect();

    It looks like a lot, but strip out the comments and it's about 30 lines of code.

    I then set up a Scheduled Task, using this in the Run: field:
    "C:\Program Files\Java\jdk1.6.0_14\bin\javaw.exe" com.example.DrupalCron
    and this in the Start in: field:
    Obviously, you need to use your own paths to javaw.exe and your Java code.


    • Use javaw.exe instead of java.exe; this stops Java from displaying a console (no windows popping up suddenly).
    • The "com.example." (in the Run: field) is necessary if you include a package specification in the Java code.
    • I couldn't specify the entire path to my code (D:\Java\DrupalCron\bin\com\example\DrupalCron) in the Run: field; I had to specify the non-package portion in the Start in: field.
    • Omitting the package specification should allow "C:\Program Files\Java\jdk1.6.0_14\bin\javaw.exe" D:\Java\DrupalCron\bin\DrupalCron in the Run: field, with the Start in: field empty.

    Other scheduled-task settings:

    • Task\Run only if logged on is checked (This is for Drupal on my local workstation; didn't test on a server)
    • Schedule\Schedule task: = Daily
    • Schedule\Advanced...\Repeat task is checked
    • Schedule\Advanced...\Every: = 15 minutes
    • Schedule\Advanced...\Duration: = 23 hour(s) 45 minute(s)
    • Schedule\Advanced...\If the task is still running, stop it at this time. is checked
    • Settings\Stop the task if it runs for: = 10 minute(s)

    This runs cron.php every 15 minutes on all of my web sites - cleanly and without disturbing me.

    gennadiy’s picture

    Thank you pbyhistorian,

    I would like to try your solution, but need some more info, please, on how to prepare that java code to run (just a bare minimum), e.g. copy-paste code in the filename.ext in the folder ..., then ...
    environment variables - ?
    classpath - ?
    Will JRE do it, or SE (JDK) is required?

    Thanks a lot,

    webcron’s picture

    You could use a tool like WebCron:

    Basically, it fakes 'cron' on hosts that don't provide access to a task scheduler. All code resides on your web server, thus no need for a third-party or external execution from a personal computer.

    Midas Man’s picture

    Hi all,

    I have setup a Task to run cron.php scheduled for every 15 minutes and stopped if it takes longer than 30 minutes. The reason I need to run it every 15 minutes is that I need to be able to send SMS messages to users at times that they choose in 15 minute blocks (eg 12:15, 14: 30, 18:45, 20:00) with upto 5 per day.

    With everything I have read, I was expecting the browser to open up, but it didn't. Should the browser open up?

    Also, it stops after 30 minutes.

    It is the first time I have setup a Scheduled Task and the first site I am developing using Drupal, so I am not sure whether I have a problem with the way I have setup the task, or with my Drupal Rule.

    Once a schedule task runs, should it appear in the Drupal logs and what should I expect to see?

    P.S. I am on Windows Vista.


    thelionkingraja’s picture

    zk_deng’s picture provides online cron job service. It's an alternative to task scheduler solution under Windows & Linux.

    ihsanullahkhan’s picture

    You can just cron your jobs in windows environment with just one line. I have almost spent my 5 hours so i want to share with other is make a task.

    • In program give php.exe path, with my installation it is c:\wamp\bin\php\php5.3.5\php.exe.
    • Second you have to put the file absolute path, which you want to run. -f c:\wamp\www\foo\foo.php in the argument

    So that's complete. There is no need for installing anything.

    jjhuff’s picture

    Hey, I just launched another free cron service:

    CloudTools just does basic HTTP requests now (cookies and HTTP auth support are on the way). I'm also working on adding scheduled SSH and EC2 operations.


    escoles’s picture

    Currently dealing with a situation on Windows 2012 where the cron Task continues to be executed even though it's been deleted. So, my suggestion is that unless you have no other option, use something other (and simpler) than Task Scheduler. E.g. if you have a *nix webserver in your environment, you could run the jobs from there. Or use one of the many fine alternatives suggested here. YMMV....