I’m working on a site in php. Is it possible to send cron jobs at times defined by an algorithm? Could I add such a functionally in the console or send it from my php script? I haven’t used cron yet.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The first thing that comes to the mind – run a cron job every minute with php script which generates random number in order to check whether to run the rest of the job.
This line in crontab will run cron job every minute (replace paths with yours)
Or if you can’t directly call php, you may use curl or wget like that
And in your php file do whatever you want to check if it’s time to run the rest of the job, like that: