Page 1 of 1

Scheduler dont do the jobs

Posted: 04 Mar 2015, 13:37
by alpin3rocker
Hi @ all,
i try to get Aimeos running on a shared Server with Typo3 7.1.0 and aimeos_dist. But the Scheduler-Jobs dont work.
I did all like described here: http://aimeos.org/docs/TYPO3/Install_Ai ... uler_tasks

At the Root of my Server is a file (scheduler.php) with this 2 lines of code:

#!/usr/local/php5.5/bin/php

/usr/local/php5.5/bin/php /home/user/www.sch....at/typo3_src-7.1.0/typo3/cli_dispatch.phpsh scheduler

What is going wrong?

The same happens with Typo3 6.2.9 i tested before.

Another installation with Typo3 6.1.7 do the jobs well on the same Server but for direct_mail not testet with aimeos.

Thank you for help and hints!
sorry for my english!

Re: Scheduler dont do the jobs

Posted: 04 Mar 2015, 13:55
by aimeos
Hi,

a few questions first:
- How do you execute your scheduler.php script? Via cronjob?
- Did you run the scheduler "Setup check" (select box at the top) and everything was green?

Re: Scheduler dont do the jobs

Posted: 04 Mar 2015, 14:07
by alpin3rocker
Hi,

yes via cronjob, every minute

yes i run the Setup check, except the first column (Last run) is all green

thanks,
Mario

Re: Scheduler dont do the jobs

Posted: 04 Mar 2015, 14:21
by aimeos
Hi Mario

Can you attach a screenshot of your scheduler task list and of one task details that doesn't work?
BTW: What exactly doesn't work? Can you describe in more detail what you are expecting?

Re: Scheduler dont do the jobs

Posted: 04 Mar 2015, 14:41
by alpin3rocker
Hi aimeos,

if i do the jobs manually, all works fine, but the typo3/cli_dispatch.phpsh is not fired by the scheduler.php which is targeted from cronjob.

thanks

Re: Scheduler dont do the jobs

Posted: 04 Mar 2015, 14:59
by aimeos
alpin3rocker wrote: if i do the jobs manually, all works fine, but the typo3/cli_dispatch.phpsh is not fired by the scheduler.php which is targeted from cronjob.
This looks like a permission problem of your cronjob if it works via the HTTP server. I think you are executing the script under a different user than your Apache process is running and the scheduler fails in this case. If not, you can try to log any output of your script to see if an error occurs during its execution.

Re: Scheduler dont do the jobs

Posted: 04 Mar 2015, 16:28
by alpin3rocker
hi aimeos,
i cant find in error.log and access.log from my server nothing that could belong to the scheduler tasks?
After cronjob every minute is done, i get via e-mail, a message with the second line from scheduler.php but without any errors.
in typo3 6.1.7 it works very well. The cronjob fire scheduler.php and the tasks are running.
i am at the end of my knowledge....

thanks
Mario

Re: Scheduler dont do the jobs

Posted: 04 Mar 2015, 16:57
by aimeos
alpin3rocker wrote: After cronjob every minute is done, i get via e-mail, a message with the second line from scheduler.php but without any errors.
in typo3 6.1.7 it works very well. The cronjob fire scheduler.php and the tasks are running.
Tried to execute a file with your two lines and got the same result. The problem is that your file contains no PHP code and simply outputs what is inside. If your server supports real cronjobs, you should add this to your crontab:

Code: Select all

* * * * /home/user/www.sch....at/typo3_src-7.1.0/typo3/cli_dispatch.phpsh scheduler
If only so called "web cronjobs" are available (PHP scripts that are called via HTTP), you need something like this in your scheduler.php to execute the command via the backtick (`) mechanism:

Code: Select all

<?php
`/home/user/www.sch....at/typo3_src-7.1.0/typo3/cli_dispatch.phpsh scheduler`;

Re: Scheduler dont do the jobs

Posted: 06 Mar 2015, 14:11
by alpin3rocker
Hi ,

yes, thats it, the missing "<?php"
and
It depends on if the "typo3" symlink is in use or not when calling the dispatcher. Otherwise you run in to a fatal error:
https://forge.typo3.org/issues/56030

now this lines to call the dispatcher via cronjob works for me:

Code: Select all

#!/usr/local/php5.4/bin/php
<?php
  exec('pwd', $myResult); 
  $myPath = $myResult[0]; 
  echo $myPath; 
  system ('env -i /usr/local/php5.4/bin/php -f ' . $myPath . "/www.sch????.at/typo3/cli_dispatch.phpsh scheduler"); 
?>  
Thank you for help