Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#1851 by Mirco
02 Sep 2015, 15:36
Hi
I have some trouble with the Scheduler Task:
[scheduler]: Task is already running and multiple executions are not allowed, skipping! Class: Aimeos\Aimeos\Scheduler\Task\Email6,

My E-Mail test task runs perfect but all aimeos tasks a running endless.
The permission for the aimeos Scheduler(incl. all files) folder is 775.

The typo3 version 6.2.12 and aimeos 2.3.0. PHP CGI 5.5
The installation runs on a shared web hosting server.

I call any 60 sec with a cron job following file:
Code: Select all<?php
    exec("php /www/htdocs/xxxxxx/ttt/typo3/cli_dispatch.phpsh scheduler",$ausgabe);
    echo "<pre>";
    print_r($ausgabe);
    echo "</pre>";
?>



I really appreciate any help you can provide.
Regards Mirco
Attachments
Schedul_Task_1.jpg
Schedul_Task_1.jpg (66.74 KiB) Viewed 1637 times
Last edited by Mirco on 04 Sep 2015, 07:37, edited 1 time in total.
#1852 by aimeos
02 Sep 2015, 16:49
Mirco wrote:My E-Mail test task runs perfect but all aimeos tasks a running endless.
I call any 60 sec with a cron job following file:
Code: Select all<?php
    exec("php /www/htdocs/w00de0a9/niederrhein-edition/typo3/cli_dispatch.phpsh scheduler",$ausgabe);
    echo "<pre>";
    print_r($ausgabe);
    echo "</pre>";
?>



Are there any error messages in the madmin_log table or in the error log of the web server?
As you are running your cronjobs via Apache, maybe they get killed after 30sec automaticaly due to the PHP max_execution time setting.
#1853 by Mirco
02 Sep 2015, 18:02
Thank you for your fast response.

The log file includes no error.

Here is some background information about my installation.
I test aimeos 2.2.3 now for a couple of days.
Yesterday I did the update to 2.3.0 and typo3 6.2.14.

With previous version(2.2.3) works the task perfect, now I have the trouble.
In the meantime I reinstalled my backup and the task runs as aspect.
I have no clue what's wrong.
Maybe it is a permission problem? Or is there some changes in the scheduler folder?
#1856 by aimeos
02 Sep 2015, 19:40
Mirco wrote:The manual start of the task in the typo3 scheduler works in aimeos version 2.3.0 without any problem,


Hm, that makes it more difficult to find the root cause ...
Can you update to the version released today (2.3.1) and try again?

Locally, it works fine in our test installation - either executing the scheduler task via the TYPO3 backend, via command line or via your posted script.
#1870 by aimeos
05 Sep 2015, 11:00
I got the hint that there was a change in the e-mail scheduler because the old implementation wasn't able to create the links in the e-mails. Due to a bug in TYPO3 6.2 we were forced to create another e-mail scheduler based on ExtBase and you have to use this one for 6.2:

1.) Scheduler -> Add Task -> ExtBase-CommandController-Task
2.) CommandController Command: Aimeos Jobs: email
3.) Save
4.) Enter details in the now shown fields

We've updated the documentation accordingly: https://aimeos.org/docs/TYPO3/Install_Aimeos/Configure_scheduler_tasks#Create_Aimeos_tasks
#1873 by Mirco
07 Sep 2015, 15:43
Hi
Thanks for the hind but it dosen't work.
I do still some research.
I will call tomorrow my provider. Maybe the have something in the server error log file.

Also I played with the php versions.
Usually I you use php 5.5 put for the testing I tried php 5.4.
If I run aimeos version 2.3.1 with php 5.4.42 I get following error:
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /www/htdocs/xxx/typo3conf/ext/aimeos/Classes/Scheduler/Base.php on line 63

Only for the records.
If I use aimeos version 2.2.3 with php 5.4.42 and typo3 4.2.13, the scheduler works.

Best regards
Mirco
#1874 by aimeos
07 Sep 2015, 16:11
Mirco wrote:Thanks for the hind but it dosen't work.


It should also work with the Aimeos e-mail scheduler but without links :-)
So this leads to the conclusion that it's not related to the e-mail scheduler itself.

Mirco wrote:Also I played with the php versions.
Usually I you use php 5.5 put for the testing I tried php 5.4.
If I run aimeos version 2.3.1 with php 5.4.42 I get following error:
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /www/htdocs/xxx/typo3conf/ext/aimeos/Classes/Scheduler/Base.php on line 63


OK, that's a good hint! This means that this code this code is the problem because it doesn't work with PHP 5.4:
Code: Select all\TYPO3\CMS\Extbase\Object\ObjectManager::class

We will change that immediately in the dev-master branch so the next release (2.3.2) will work with PHP 5.4 again. Does your Hoster use PHP 5.5 too or still 5.4?

Mirco wrote:If I use aimeos version 2.2.3 with php 5.4.42 and typo3 4.2.13, the scheduler works.


If you have to use PHP 5.4, you should at least upgrade to Aimeos 2.2.4 due to a security issue in 2.2.3 and before.
#1875 by Mirco
07 Sep 2015, 17:27
The default php version of the hoster is 5.4.x
I can change the version via cgi to 5.5
AddHandler php55-cgi .php .phish

If you have to use PHP 5.4, you should at least upgrade to Aimeos 2.2.4 due to a security issue in 2.2.3 and before.

Thanks, is not necessary because is a test installation :) to get rid of the scheduler problem.
#1876 by Mirco
08 Sep 2015, 12:59
Hi
You have solved my problem :mrgreen: !!

I have change the line 63 in base.php in to
Code: Select all$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( 'TYPO3\CMS\Extbase\Object\ObjectManager' );

And now the scheduler runs like it should. (php Version 5.4.42)
Thanks for your excellent help.