I am trying to develop a cron job for a command I have already created. I am completely new to cron jobs so I dont really know how it works.
Trying the command by myself in the console works perfectly. All I need is to be able to execute it every 24 hours. I am using Laravel 4, can anyone help?
Thanks!
To create a cron job as root, edit your cron file:
Add a new line at the end, every line is a cron job:
This will execute the same command at 10:25AM everyday.
Just make sure you keep a blank line after the last one. And you also might need to use the full path of your php client:
See my answer on this question, my example is for L3 but should work for Laravel 4 accordingly.
You could register your cron job like this: