Scheduler dont do the jobs

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
alpin3rocker
Posts: 29
Joined: 04 Mar 2015, 09:16

Scheduler dont do the jobs

Post by alpin3rocker » 04 Mar 2015, 13:37

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!

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Scheduler dont do the jobs

Post by aimeos » 04 Mar 2015, 13:55

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?

alpin3rocker
Posts: 29
Joined: 04 Mar 2015, 09:16

Re: Scheduler dont do the jobs

Post by alpin3rocker » 04 Mar 2015, 14:07

Hi,

yes via cronjob, every minute

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

thanks,
Mario

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Scheduler dont do the jobs

Post by aimeos » 04 Mar 2015, 14:21

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?

alpin3rocker
Posts: 29
Joined: 04 Mar 2015, 09:16

Re: Scheduler dont do the jobs

Post by alpin3rocker » 04 Mar 2015, 14:41

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
Attachments
manually executed
manually executed
scheduler3.jpg (133.92 KiB) Viewed 9215 times
scheduler1.jpg
scheduler1.jpg (148.8 KiB) Viewed 9215 times
after fresh installation typo3 and aimeos_dist with running cronjob and configured tasks like described in Manual
after fresh installation typo3 and aimeos_dist with running cronjob and configured tasks like described in Manual
scheduler.jpg (142.88 KiB) Viewed 9215 times

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Scheduler dont do the jobs

Post by aimeos » 04 Mar 2015, 14:59

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.

alpin3rocker
Posts: 29
Joined: 04 Mar 2015, 09:16

Re: Scheduler dont do the jobs

Post by alpin3rocker » 04 Mar 2015, 16:28

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

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Scheduler dont do the jobs

Post by aimeos » 04 Mar 2015, 16:57

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`;

alpin3rocker
Posts: 29
Joined: 04 Mar 2015, 09:16

Re: Scheduler dont do the jobs

Post by alpin3rocker » 06 Mar 2015, 14:11

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

Post Reply