• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • Our UX team believes in the in the power of direct feedback and would like to invite you to participate in interviews, tests, and surveys.
    To stay in the loop and never miss an opportunity to share your thoughts, please subscribe to our UX research program. If you were previously part of the Plesk UX research program, please re-subscribe to continue receiving our invitations.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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