Hi,
I have an issue getting user-defined php settings working for cronjob / planned task entries. In detail I want to increase the memory limit for a laravel 5 cronjob. For the customer the php settings the memory limit is already raised (to 512M), but the default limit is at a lower value (128M).
If I use the "Execute PHP script" option I can properly setup the command line parameters and PHP-Version, but it will always use the global default values (128M). For obvious reasons I dont want to increase the memory limit for the whole server.
If I use the "Execute command" option I can not run the php script at all because the php executables are not available within the chroot environment. (Right?) For obvious reasons I don't want to enable unprotected shell access for the whole server. (Enabling that Option for a single customer would already be better, but still a workaround)
If I use the "Query URL" option I have to build a workaround (see below) for executing CLI commands from a php script. Also I have the cronjob script publicly accessible which may be used for DOS in the worst case (or at least putting high load on the server). Also not a desirable solution.
Is there any better way to solve this? I'm really staggered that I couldn't find anything about this even after extensive search, since this should actually be a pretty common issue?
Thanks in advance
Best regards Jens N
I have an issue getting user-defined php settings working for cronjob / planned task entries. In detail I want to increase the memory limit for a laravel 5 cronjob. For the customer the php settings the memory limit is already raised (to 512M), but the default limit is at a lower value (128M).
If I use the "Execute PHP script" option I can properly setup the command line parameters and PHP-Version, but it will always use the global default values (128M). For obvious reasons I dont want to increase the memory limit for the whole server.
If I use the "Execute command" option I can not run the php script at all because the php executables are not available within the chroot environment. (Right?) For obvious reasons I don't want to enable unprotected shell access for the whole server. (Enabling that Option for a single customer would already be better, but still a workaround)
If I use the "Query URL" option I have to build a workaround (see below) for executing CLI commands from a php script. Also I have the cronjob script publicly accessible which may be used for DOS in the worst case (or at least putting high load on the server). Also not a desirable solution.
PHP:
<?php
$_SERVER['argv'] = [ "artisan", "queue:work", "--queue=plugins,default", "--once" ];
include "../artisan";
Is there any better way to solve this? I'm really staggered that I couldn't find anything about this even after extensive search, since this should actually be a pretty common issue?
Thanks in advance
Best regards Jens N
Last edited: