Cron like behavior (SOLVED)

Hi ,
I need a php script to run periodically or at application startup .
Ivied manage to create a .bat file which sets a task in windows, but the problem is i can’t run the php file from the bat ,or i don’t know how to accomplish this.

Any pointers on how can i make my cron.php file run in the background ?

This is not the official answer, but I’m going to need something similar soon, and here’s what I was thinking of:

  1. Create a standard PHP page in the ExeOutput file, as per normal.
  2. Set up ExeOutput to allow multiple instances to run
  3. In your batch file, use the ExeOutput command line parameters (see “Application Command Line Arguments” in the helpfile) to launch your executable at the page you created in step 1 (eg MyExe.exe page ‘path\to\your\page.php’ )

The two tricky bits are the actual scheduling (eg, see , and whether you want the cron-driven executable to be visible (some ideas at )

Hope that helps!


Works like a charm, the aplication dosent actualy start ( nothing visibale ) when the task starts.
This is the whay i use the file path in the bat, since my files are external .

C:\path to exe \index.exe page http://heserver/include/class/update.class.php

Thanks Andy

No problem. Glad to see it worked!


The cron like works grate , but I’m facing a small problem , it’s not really something that needs fixing but if there’s a solution would be perfect.
Lunching myapp.exe to load my cron.php from the task scheduler is a good solution , but every time it gets lurched from task starts a new instance in case of “allow multiple instances”, in the case that multiple instances are not allowed when it lunches the exe gets me to my home page if the application is opened.
So ivied created a new project cron.exe in the same folder that uses a single external page from my main aplication ( Data/include/cron.php ) with a minimum window 0 height 0 width so that when it opens doesn’t distract much .
At the end of my cron.php page i use this exo_runhescriptcom ( “Macros.MacroExit” ); to close the app when the php code finishes its work.
And now the cron.exe starts and closes every 10 min with a minimum distraction , the only thing that bothers me is the icon popping up and despairing in the programs bar every 10 min.

Is there a whey that i can eliminate the icon and the windows like a silent mode ? maybe something made in HEScript which i don’t understand much.

I know that all this can be avoided with php.exe but in case of ExeOutput this is not possible ( I think ) .

Any help with this is much appreciated .



Not sure if this will help or you have already thought of this…

You can start an .exe file in Windows to run minimized… see if this helps you…


Thanks SysAdm
But minimised stell show the icon in the programa bar .

My last thought would be to convert the .exe to a Windows Service…


[quote]Exe To Service allows you to install any Windows executable, VBS or JS script as a service. Windows services are background processes that do not interfere with the logged in user’s environment. Windows services are controlled by the Service Control Manager. You can start them on boot before the user logs on and control their execution remotely. Exe To Service also installs a simple service scheduler. Thus, you can also start services at a specified time.[/quote] -


You could try to use a Tray icon instead:
In a future version, we’ll add the option to create non-GUI PHP applications, like for other PHP to EXE compilers.

Many tanks gdgsupport.
The Tray icon and run minimized works exactly as i wished .