Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

successdav's avatar

How do I get my task schedule to start running on ubuntu server

According to Laravel documentation

When using the scheduler, only a single cron entry is needed on your server. 

I have the task define. How do I get this single cron entry on my server to be active?

0 likes
2 replies
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Easiest is to just run crobtab -e as the user and paste the schedule in there

Or if you want you can add it to a file in /etc/cron.d, but that requires sudo (admin)

OussamaMater's avatar

You need to configure the cron job to run the scheduler

nano /etc/cron

and at the very bottom add this line

# change the path to your project
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

which changes directory to your project and run the artisan scheduler command every minute, all the output is redirected to /dev/null which is a null file that discards anything written to it (as you don't need that output), you may redirect errors to a log file also if you wish so 2> file.log.

Reference:

A guide:

2 likes

Please or to participate in this conversation.