• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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