• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Question cron with arguments

straddi

Basic Pleskian
Server operating system version
Debian 11
Plesk version and microupdate number
18.0.68 #1
Sorry,

I'm in the wrong forum.

Hi,

I would like to run the following command in Plesk via cron in a directory named httcdocs/test

php -d memory_limit=-1 bin/magento cron:run

I can't seem to get this to work. Can anyone help me figure this out?
Best regards
 
I tried this as follows.
Ruin a command
/opt/plesk/php/8.3/bin/php /var/www/vhosts/domain.com/httpdocs/test/bin/magento php -d memory_limit=-1 cron:run

However, this creates an exhausted allowed memory size of 134217728 bytes.

This should be prevented by:
php -d memory_limit=-1
which also works on the CLI level.
 
It is important what options and in which order do you use; as I understand, you don't need to mention php twice (`/opt/plesk/php/8.3/bin/php`, `php`), and `-d memory_limit=-1` should be right after the first `php`.

Here is an example.
Code:
# /opt/plesk/php/8.3/bin/php /var/www/vhosts/domain.com/httpdocs/test/bin/magento php -d memory_limit=-1 cron:run
128M

# /opt/plesk/php/8.3/bin/php -d memory_limit=-1 /var/www/vhosts/domain.com/httpdocs/test/bin/magento cron:run
-1
 
Back
Top