I need to run a cron job with the following expression */20 16-23 * * *
by my time zone ( Africa/Cairo ) on my Cpanel shared hosting.
I created the cron job successfully but it has done by server time/zone ( USA I guess ). after a lot of searches, I found a solution ( didn't fix my problem ) that is put a TZ="Africa/Cairo"
before my command so the whole line something like this.
*/20 16-23 * * * TZ="Africa/Cairo" curl example.com
And unfortunately, it didn't work for me! as after 12 am by my time/zone the cron job still working which shouldn't!!
( */20 16-23 * * * ) every 20 min between 4 pm and 12 am