What doesn't work? The actual artisan command, or cron not executing the command?
If the latter, make sure you're using the proper crontab syntax. You need to specify the frequency using the first 5 parameters.
To have it run every minute (pretty common practice I'd think), you would want this for your crontab entry:
Yes I have set up the frequency in cpanel. As I am using shared hosting how do I check php executable?
When I run schedule run command from cotroller it works fine. But in cronjobs does not work. I gave the following command to see log file but file is empty:
Note:Before changing the hosting I was able to change the root but now I cant. If I do shows no specified file error which I could not resolved. So I had to keep public file in public_html folder and rest of them in /root1. I mentioned it thinking if it is related somehow.
After a bit of analysis I have found that every time the cron is running it gives me a error in error log:
[15-Feb-2019 03:51:01 UTC] PHP Parse error: syntax error, unexpected '?' in /home/nemanu/root1/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 233