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