0
votes

I'm using TYPO3 ver. 9.5.19 and currently trying to execute a cron job with the TYPO3 Scheduler after installing the Aimeos Shop Extension.

I'm getting this error for the Setup Check:

CLI script The script to execute the Scheduler from the command line is: "/var/www/vhosts/.../typo3/sysext/core/bin/typo3 scheduler:run". The webserver user is not allowed to execute this script.

How do I allow the Webserver User to execute the script? I tried to run "/var/www/vhosts/.../typo3/sysext/core/bin/typo3 scheduler:run" on my Linux server but nothing happened.

2
This question seems more appropriate the SuperUser exchange. superuser.com - alfadog67
In some environments, the webserver has only read/write permission on the binary but is not allowed to execute it. So, allow the execution: chmod u+x /var/www/vhosts/.../typo3/sysext/core/bin/typo3 - Julian Hofmann
@JulianHofmann thanks that solved my problem! :) - Baalarios
@JulianHofmann, pls write an answer so it can be accepted. It's useful tip and should be available for others. - biesior

2 Answers

1
votes

In some environments, the webserver user has only read/write permission on the binary but is not allowed to execute it. Check it:

ls -al typo3/sysext/core/bin/typo3

Your system should return something like:

-rwxr--r--  1 www-data  www-data  895  9 Jun 10:49 typo3/sysext/core/bin/typo3

If there's no x at the fourth position, the owner of the binary is not allowed to execute it. At position 7 it would be granted via the group, at last position for everyone/others.

You can grant the permission via

chmod u+x typo3/sysext/core/bin/typo3
0
votes

When the system says Task failed to execute successfully., Starting Scheduler with the task ID helps me.

  • For example (when task uid is 8):
/usr/local/bin/php typo3/sysext/core/bin/typo3 scheduler:run  --task=8

See the source here: docs.typo3.org/scheduler

If you have several tasks in Scheduler, then some of them may work, and some may not, when using: scheduler: run.
It is necessary for each task to have its own line in the system file and script: scheduler: run --task=8. Then all these tasks will work out.