Daily Cron Job

I had a SQL event that ran once per day, but since events are not allowed in this hosting service, I saw that I could try to replace it with Cron Jobs. However, the job would be to execute a SQL script once a day at 5:00 AM, but all I’ve seen I can configure (at least when creating it) is how often to execute the script in minutes and/or hours, so I’ve got two questions:

1 - How can I make a daily Cron Job? Since the closest I can create is a job that executes every 59min and 23h, (which by the way, I don’t know if it would be every 59 min and every 23h OR every 23h and 59min) and therefore, since it takes less that 24h to execute, eventually it would start executing before 5:00 AM and so on.

2 - Is it possible to select an hour to start the job? Because I need it to execute everyday at 5:00 AM

Thanks

I would set it to 23hr and 59min. If it ran correctly, it would run a minute earlier every day. Note that cron jobs are tricky on this hosting, and have a tendency to be delayed or not run at all. If you want something you can rely on, you might want to upgrade to premium hosting. Unfortunately, there is no way to set a specific time.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.