Start of the day I set database with message to send in 8.30AM to 9.30AM
8.30AM -> “Some Message”
9.30AM -> “Another Message”
…
9.30PM -> “Sign Off”
I need to write cronjob to run this. How to set cronjob to run in every 30th minute of the hour?
I need how to set up cronjob to run in every 30th minute of the hour. (eg. 8.30, 9.30) My server is in UTC and I need to run the script on Asia/Karachi timezone.
I’m setting the cronjob from a shared cpanel. So I don’t have privilege to change server timezone.
3
Answers
Since server is in UTC, set job to run in every hour's starting minute it runs at every 30th minute in my timezone (GMT+0530)
You can run the cron job every 30 mins of every hour:
You add your logic in some function where you don’t use sessions, or which doesn’t require any login to access.
Then in your cpanel u can create a cron job.
You can refer this answer for more details.