0

My server runs in the GMT timezone, which means it switches to British Summer Time in the summer.

I want a cron job to run in UTC as it accesses an external service that runs in that timezone.

i.e. In the winter, my job should run when the server time is 1am (GMT = UTC) and in the summer at 2am (GMT is ahead of UTC one hour).

I do not want to change the server to use UTC for its timezone, as other jobs run according to local time. N.B. The job I run at 1am doesn't itself access time info so doesn't need to know what timezone it's running in. It just needs to run at a UTC time.

user35042
  • 2,601
  • 10
  • 32
  • 57

1 Answers1

0

The easiest approach would be a wrapper script that checks local time and then executes the actual job appropriately. The corn entry would be the wrapper script, and you’d want to run it hourly for the time period to account for variance.

tilleyc
  • 914
  • 4
  • 11
  • Thanks. Since no one else has answered, I'll have to assume that's it. A bit clunky but I guess it'll work. – Julian7 Feb 27 '22 at 08:57