CronTab Cronjob on Windows Xampp


1. Create a php file that calls the cron.php file: Using notepad (or whatever), paste the following into a new file:

$data = file(“http://pearl.supplychain.com/cron.php”);

you’ll need to put it inside the regular php tags, with the “less than sign” ? php at the front, and the ? “greater than sign” at the end. (I can’t seem to just type that because it is “suspicious content” and drupal doesn’t allow it)

Save it as executecron.php, into the same directory as cron.php (htdocs).

2. Set up a scheduled task that calls this regularly:
a. Open Start–All Programs–Accessories–System tools–Scheduled tasks.
b. Double-click on scheduled tasks.
c. Set up a Daily task that starts at 12:00 am and runs every half hour (or whatever) until 11:59 pm. Tell the task to “run” the following:

C:\cms\xampp\php\php.exe c:\cms\xampp\htdocs\executecron.php

(On this system, php.exe is installed in C:\cms\xampp\php, but you’ll probably have to change the path).

Note: If using the machine, you’ll see the command window open for a couple seconds whenever it runs the cron task. This is rather confusing at first.
by gwerker – founded here http://drupal.org/node/37277

About these ads

11 responses to this post.

  1. Posted by Shashi on February 24, 2009 at 6:06 am

    Thanks a lot for the information. Its very useful for a windows user like me.

    Reply

  2. Posted by Anonymous on May 8, 2009 at 1:58 pm

    hi,

    i could not find the php.exe in my xampp folder….and when i gave the following

    C:\Program Files\xampp\php\php.exe c:\Program Files\xampp\htdocs\billing2\billing.php

    it said could not start

    Reply

    • Dont install XAMPP on “C:\Program Files” it won’t work correctly. Just install it on its default dir “c:/xampp” and i’m sure you won’t face any more problems.

      Reply

  3. Posted by Ryan on June 2, 2009 at 9:43 am

    I found the file you are looking for at C:\xampp\php\php.exe

    Reply

  4. Thanks
    This is very nice post .. I got a great solution for windows..

    Reply

  5. Posted by avenuoume on November 5, 2010 at 2:04 pm

    Download for free all content from site http://ero2you.unextwarez.com
    Its really free VIDEO only for you!
    Public sex, amateur sex video, straight sex, young teens fucks!
    All free content for you in full videos http://ero2you.unextwarez.com

    ENJOY!

    Reply

  6. Posted by Anonymous on August 3, 2011 at 1:06 am

    it adds -f between php.exe path and cron script path looks like : C:\cms\xampp\php\php.exe -f c:\cms\xampp\htdocs\executecron.php

    Reply

  7. great source for cron job, windows.

    Reply

  8. the problem is simple: you create a script which have inside in a loop which is executed at every 60 seconds for example. this is the example script:

    good luck.

    Reply

  9. The burglar or burglars ransacked the house and took a gold wedding band with five small diamonds across it, a gold wedding ring with one large diamond in the middle and three smaller ones on either side of it, a man gold wedding ring, and an undisclosed amount of cash.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 171 other followers

%d bloggers like this: