Reputation: 1661
I have a code in laravel, I want to setup a cron job in cpanel But I don't know how to. I saw several examples that has file name to cron, but I am using Laravel so how can I point this to URL route?
/usr/bin/curl https://example.com/cron_route
I am not sure is this correct method or I can do that in different way, well I canot use laravel artisan scheduler, I have all custom code and custom Controller.
can anyone help me out with this?
Upvotes: 1
Views: 8927
Reputation:
To add cronjob using command line, use this command
0 2 * * * wget -q -O /dev/null http://example.com/cron_script
See for reference : https://crontab.guru/
Upvotes: 4
Reputation: 6005
Try this command
1 1 * * 0 /usr/bin/curl -m 120 -s https://example.com/cron_route &>/dev/null
Upvotes: 6