Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Godaddy Hosting Cron Job Timezone setting

I'm using godaddy hosting and running cron job for codeigniter. That will be running every day at 10am. So in cron tab i tried like this

00 10 * * * export TZ=Asia/Dhaka; wget http://www.example.com/function

00 10 * * * TZ=Asia/Dhaka; wget http://www.example.com/function

00 10 * * * export TZ=Asia/Dhaka; /usr/bin/curl "http://www.example.com/function"

Always those command executing on others timezone maybe UTC timezone but i need Asia/Dhaka timezone UTC +6:00.

How do i write correct timezone command and where to write it?

Godaddy Cron Tab Look Like this enter image description here

like image 844
Tawhidul Islam Avatar asked Aug 06 '16 05:08

Tawhidul Islam


People also ask

How do I change the timezone in cron expression?

Thankfully, you can configure a specific timezone for your Cron job as follows: First, you need to export the TZ variable in your Shell script before any other Shell entries. Next, access your crontab and use the crontab environment variable CRON_TZ at the start of the crontab file.

How do I change my timezone in GoDaddy?

From the Settings menu, click Display Settings. Go to the Time tab. From the Time Zone list, select your time zone. From the Numeric Date Format list, select the format you want dates to display as.

What time zone are cron jobs in?

All cronjobs are executed at CET (Central European Time). CET time is the same as UTC+1 (previously GMT+1).

Is cron in UTC time?

All cron jobs use UTC time.


1 Answers

The above answers didn't help me, they both gave me the date / time for the domain, but not for cron job. What helped me to determine the cron job schedule is:

  1. Take your IP address from cpanel
  2. Google where it's located by searching IP xxx.xxx.xxx.xxx
  3. Google time in that city / country
  4. You have determined your timezone
like image 78
RobRalph Avatar answered Sep 28 '22 04:09

RobRalph