saraaa wrote: ↑Wed Aug 28, 2019 12:47 pm
Then, I wrote the following code in Command Prompt:
Code: Select all
I don’t understand what is the functionality of "C:\wamp\php\php.exe" in above command? Anyway, my wamp has been
SCHTASKS /Create /sc MINUTE /mo 2 /tn "ProcessMaker Cron every 2 minutes" /TR "C:\wamp\php\php.exe -f D:\processmaker\apps\processmaker\htdocs\workflow\engine\bin \cron.php
C:\wamp\php\php.exe is the path to where you have PHP installed so that you can use PHP to execute the timereventcron.php file. You need to change it to match your system.
You don't have the closing quotation mark at the end of your command and you have a space in the path that shouldn't be there. Also you need to execute both the timereventcron.php and cron.php scripts.
First, you need to delete that scheduled task because it is bad:
schtasks /delete /tn "ProcessMaker Cron every 2 minutes"
Then, you need to test these commands to make sure that they works from the command line of your server:
C:\wamp\php\php.exe D:\processmaker\apps\processmaker\htdocs\workflow\engine\bin\cron.php -f
C:\wamp\php\php.exe D:\processmaker\apps\processmaker\htdocs\workflow\engine\bin\timereventcron.php -f
(Add the -f
option to force it to execute.)
Does it work when executing manually? If so, then you know that the commands are good. If you don't know, then post the output of the commands.
Now you need to schedule the commands to not execute at the same time. You shouldn't be executing every 2 minutes! (Did you read the documentation where it explains that the command has to finish, so you should leave 5 minutes for it to complete? And remember to add the -f
to the end.