Cron Error help

Hi guys! need help I need Cron for

* * * * * /usr/bin/php /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan schedule:run >> /dev/null 2>&1
* * * * * /usr/bin/php /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan queue:work --queue=mail,sms,thumbs,default >> /dev/null 2>&1

bur get Error

What error?

cd /home/xxx/web/xxxx.nl/public_html/thumbnail/ && /usr/bin/php8.3 artisan schedule:run

Should work fine

Th…you for hepl, see pics. it’s no work, vere I can see cropjob error log?

or I NEED:
/usr/bin/php8.2 /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan schedule:run >> /dev/null 2>&1 /usr/bin/php8.2 /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan queue:work --queue=mail,sms,thumbs,default >> /dev/null 2>&1

You can’t see any error because you are redirecting standard output and standard error output to /dev/null

First check whether those commands work, login via ssh with user wellesley and execute the command manually without redirections.

/usr/bin/php8.2 /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan schedule:run
/usr/bin/php8.2 /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan queue:work --queue=mail,sms,thumbs,default

Last login: Sun Feb 9 09:10:33 2025 from 66.220.205.43
root@server:~# /usr/bin/php8.2 /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan schedule:run

INFO No scheduled commands are ready to run.

You are executing it as root, you must execute it as your user.

Last login: Wed Feb 19 17:54:24 2025 from 66.220.205.43
root@server:~# /usr/bin/php8.2 /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan queue:work --queue=mail,sms,thumbs,default

INFO Processing jobs from the [mail,sms,thumbs,default] queues.

Error

Call to undefined function Illuminate\Queue\pcntl_async_signals()

at /home/wellesley/web/ads.wellesleystreeteast.com/public_html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:725
721▕ * @return void
722▕ */
723▕ protected function listenForSignals()
724▕ {
➜ 725▕ pcntl_async_signals(true);
726▕
727▕ pcntl_signal(SIGQUIT, fn () => $this->shouldQuit = true);
728▕ pcntl_signal(SIGTERM, fn () => $this->shouldQuit = true);
729▕ pcntl_signal(SIGUSR2, fn () => $this->paused = true);

  +16 vendor frames

17 /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan:13
Illuminate\Foundation\Application::handleCommand()

root@server:

I have VPS and root only

You at least have the user wellesley

I can’t see the function pcntl_async_signals disabled by default but I see pcntl_signal and pcntl_signal_dispatch disabled for php cli.

Edit file /etc/php/8.2/cli/php.ini and remove those functions from disable_functions directive.

you mean to install the pcntl extension to use the pcntl_signal() function?

Open the terminal and run the following command to install the pcntl extension:
sudo apt-get install php-pcntl
Restart your web server to apply the changes:
sudo service apache2 restart
Verify that the pcntl extension is installed by running the following command:
php -m | grep pcntl

No, I meant what I said :wink:

Edit file /etc/php/8.2/cli/php.ini and remove those functions (pcntl_signal and pcntl_signal_dispatch) from disable_functions directive.

To make it easier, execute these commands:

cp /etc/php/8.2/cli/php.ini /root/backup_8.2_php.ini
sed -i -E 's/(^disable_functions.*),pcntl_signal(.*$)/\1\2/' /etc/php/8.2/cli/php.ini
sed -i -E 's/(^disable_functions.*),pcntl_signal_dispatch(.*$)/\1\2/' /etc/php/8.2/cli/php.ini

And try again.

Last login: Wed Feb 19 17:57:56 2025 from 66.220.205.43
root@server:~# cp /etc/php/8.2/cli/php.ini /root/backup_8.2_php.ini
root@server:~# sed -i -E 's/(^disable_functions.*),pcntl_signal(.*$)/\1\2/' /etc/php/8.2/cli/php.ini
root@server:~# sed -i -E 's/(^disable_functions.*),pcntl_signal_dispatch(.*$)/\1\2/' /etc/php/8.2/cli/php.ini
root@server:~#

====================

Last login: Wed Feb 19 20:27:19 2025 from 66.220.205.43
root@server:~# /usr/bin/php8.2 /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan schedule:run

   INFO  No scheduled commands are ready to run.
=====================
root@server:~# /usr/bin/php8.2 /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan queue:work --queue=mail,sms,thumbs,default

   INFO  Processing jobs from the [mail,sms,thumbs,default] queues.


   Error

  Call to undefined function Illuminate\Queue\pcntl_async_signals()

  at /home/wellesley/web/ads.wellesleystreeteast.com/public_html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:725
    721▕      * @return void
    722▕      */
    723▕     protected function listenForSignals()
    724▕     {
  ➜ 725▕         pcntl_async_signals(true);
    726▕
    727▕         pcntl_signal(SIGQUIT, fn () => $this->shouldQuit = true);
    728▕         pcntl_signal(SIGTERM, fn () => $this->shouldQuit = true);
    729▕         pcntl_signal(SIGUSR2, fn () => $this->paused = true);

      +16 vendor frames

  17  /home/wellesley/web/ads.wellesleystreeteast.com/public_html/artisan:13
      Illuminate\Foundation\Application::handleCommand()

I would check it on Laravel forums to know what that app needs.

th…you very much for help