We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Create a file:
/etc/systemd/system/schedule-mysite.service
Add the following content:
[Unit]
Description=Runs and keeps alive the artisan schedule:run process for www.mysite.com
[Service]
Restart=always
WorkingDirectory=/var/www/www.mysite.com
ExecStart=/usr/bin/php artisan schedule:work --env=production
StandardOutput=append:/var/www/www.mysite.com/storage/logs/schedule.log
StandardError=append:/var/www/www.mysite.com/storage/logs/schedule.log
[Install]
WantedBy=default.target
To enable it:
$ systemctl enable schedule-mysite
To start it:
$ systemctl start schedule-mysite
To get the status:
$ systemctl status schedule-mysite
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.