I have a table with 1000 quotes stored, each with an auto incremented primary key ID. Each day at 6:00 AM I would like to run a script that queries a random ID number and returns the quote associated with that ID. I have never used a Cron Job before and when approaching it in Cpanel it does not exactly step you through how it is done. Is there a way to trigger a specific function with a cron job at a specific time each day?
Asked
Active
Viewed 61 times
0
-
1Welcome to SO. Please read [What topics can I ask about](http://stackoverflow.com/help/on-topic) and [How to ask a good question](http://stackoverflow.com/help/how-to-ask) And [the perfect question](http://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) And how to create a [Minimal, Complete and Verifiable example](http://stackoverflow.com/help/mcve) SO is **not a free Coding or Code Conversion or Debugging or Tutorial or Library Finding service** – RiggsFolly Aug 02 '16 at 22:42
-
1the cron job is trivial, have you got a script to make the query etc? – Aug 02 '16 at 22:44
-
1Sidenote: I may have closed the question prematurely based on *"Is there a way to trigger a specific function"*. However, this does seem to be the case here, "how to run a cron job at a specific time". If I did do a bad close, then ping me and I'll reopen. However, do add extra information/detail to the question should it be the case. – Funk Forty Niner Aug 02 '16 at 22:48
-
1if you have the script i'll writer the cron job command, but i ssuspect you dont have the script yet. you should ask a new question on that. – Aug 02 '16 at 22:53