• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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