'Run a Cron Job In Cpanel with CURL

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?



Solution 1:[1]

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/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1