• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Question Plesk Laravel scheduler runs console app twice

vanherst

New Pleskian
I have added the Laravel scheduler as a scheduled task to Plesk see picture below

CdrFR.png


I have added the following lines to app\Console\Kernel.php.

$schedule->command('*********')->dailyAt('06:00')->evenInMaintenanceMode()->runInBackground()->withoutOverlapping(10)->emailOutputTo('info@*****.com');

Everythings looks fine but the job is running twice, I get the following email notifications:

1. Scheduled Job Output For ['/usr/bin/php7.4' 'artisan' ***********]
2. Scheduled Job Output For ['/opt/plesk/php/7.4/bin/php' 'artisan' ***********]

What have I done wrong?

Output of `crontab -l`:

MAILTO=""
SHELL="/bin/bash"
* * * * * cd /var/www/vhosts/*******.com/httpdocs && /opt/plesk/php/7.4/bin/php artisan schedule:run >> /dev/null 2>&1

And the same for root:
0 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/secur-check
0 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/send-report weekly
10 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/clean-sysstats
15 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats day
15 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats week
15 1 1 * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats month
15 1 1 * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats year
20 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/clean-events
0 3 * * 7 /usr/local/psa/libexec/modules/watchdog/cp/clean-reports
47 23 * * * /usr/sbin/ntpdate -b -s 2.pool.ntp.org

I did some more testing.
If I execute a function with $schedule->call() it is running once.
 
Back
Top