Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #229217

Re: Cron Jobs and Time Zones Has Anything Changed?

From Eduardo M KALINOWSKI <eduardo@kalinowski.com.br>
Newsgroups linux.debian.user
Subject Re: Cron Jobs and Time Zones Has Anything Changed?
Date 2020-12-02 15:10 +0100
Message-ID <BhAZs-3j7-5@gated-at.bofh.it> (permalink)
References <BhAwp-2TQ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/12/2020 10:30, Martin McCormick wrote:
> In a recent discussion, someone indicated that there might be a
> way to set individual parts such as accounts on a unix system so
> that cron could use another time zone if needed to kickoff jobs
> on that system based on the time in another country.
>
> 	As far as I understand cron, one can set the system's
> time zone to only one value which is usually one's local clock
> time and that works very well since system logs and cron jobs all
> agree with what is appropriate for one's location.
>
> 	I record a news broadcast from one of the BBC services
> every week day at 17:45 British time.  When Europe and North
> America stop or start shifting daylight in Autumn or Spring,
> there's a really good chance of missing some of the broadcasts if
> one doesn't think about it since these shifts don't all happen on
> the same time.
>
> 	One can certainly get the time anywhere as recently
> discussed by setting the TZ environment variable but, if you tell
> cron to trigger a job at 17:45, it only knows when that is based
> on the entire system's local time.
>
> 	Has anything changed recently to make this logic
> obsolete?
>
> 	In my case, I just have an old Linux box for which I set
> it's system time zone to Europe/London and call it good but this
> could get out of hand if one had more than 2 or 3 such schedules.
>
> 	One could also setup VM's if you have the memory to spare
> but this adds a lot of resource usage and complexity to the job
> at hand so my question is basically, has anything fundamentally
> changed in the way cron is used?
>
> 	This is not a complaint at all.  I was first introduced to
> unix-like systems in 1989 and immediately knew that this was the
> sort of OS I wanted to stick with in amateur radio and technical
> tinkering in general.
>
> Martin McCormick   WB5AGZ
>
systemd timers seem to allow specification of activation time including
a time zone. However, I'm not sure if DST changes are considered - it
might just convert the specified time to the local time zone when the
timer definition is read so that you can specify '17:45 GMT' and it runs
at, say, your 10:45, but it won't automatically pick up that 17:45 GMT
is not 11:45 local. I might be wrong, though.


-- 
To do nothing is to be nothing.

Eduardo M KALINOWSKI
eduardo@kalinowski.com.br

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Cron Jobs and Time Zones Has Anything Changed? "Martin McCormick" <martin.m@suddenlink.net> - 2020-12-02 14:40 +0100
  Re: Cron Jobs and Time Zones Has Anything Changed? Greg Wooledge <wooledg@eeg.ccf.org> - 2020-12-02 14:40 +0100
    Re: Cron Jobs and Time Zones Has Anything Changed? Dan Ritter <dsr@randomstring.org> - 2020-12-02 15:00 +0100
      Re: Cron Jobs and Time Zones Has Anything Changed? "James B" <portoteacher80@fastmail.com> - 2020-12-02 15:00 +0100
        Re: Cron Jobs and Time Zones Has Anything Changed? Andy Smith <andy@strugglers.net> - 2020-12-02 17:30 +0100
          Re: Cron Jobs and Time Zones Has Anything Changed? "James B" <portoteacher80@fastmail.com> - 2020-12-02 17:30 +0100
          Re: Cron Jobs and Time Zones Has Anything Changed? "Martin McCormick" <martin.m@suddenlink.net> - 2020-12-03 14:40 +0100
            Re: Cron Jobs and Time Zones Has Anything Changed? Andy Smith <andy@strugglers.net> - 2020-12-04 03:20 +0100
              Re: Cron Jobs and Time Zones Has Anything Changed? Andy Smith <andy@strugglers.net> - 2020-12-04 03:40 +0100
              Re: Cron Jobs and Time Zones Has Anything Changed? David <bouncingcats@gmail.com> - 2020-12-04 03:40 +0100
            Re: Cron Jobs and Time Zones Has Anything Changed? Andrei POPESCU <andreimpopescu@gmail.com> - 2020-12-04 11:20 +0100
              Re: Cron Jobs and Time Zones Has Anything Changed? "Martin McCormick" <martin.m@suddenlink.net> - 2020-12-06 19:30 +0100
                Re: Cron Jobs and Time Zones Has Anything Changed? Andrei POPESCU <andreimpopescu@gmail.com> - 2020-12-07 09:10 +0100
      Re: Cron Jobs and Time Zones Has Anything Changed? Greg Wooledge <wooledg@eeg.ccf.org> - 2020-12-02 15:10 +0100
        Re: Cron Jobs and Time Zones Has Anything Changed? "Martin McCormick" <martin.m@suddenlink.net> - 2020-12-02 18:30 +0100
          Re: Cron Jobs and Time Zones Has Anything Changed? Dan Ritter <dsr@randomstring.org> - 2020-12-02 19:20 +0100
            Re: Cron Jobs and Time Zones Has Anything Changed? Greg Wooledge <wooledg@eeg.ccf.org> - 2020-12-02 19:40 +0100
  Re: Cron Jobs and Time Zones Has Anything Changed? Eduardo M KALINOWSKI <eduardo@kalinowski.com.br> - 2020-12-02 15:10 +0100
  Re: Cron Jobs and Time Zones Has Anything Changed? Fabrice BAUZAC-STEHLY <noon@mykolab.com> - 2020-12-03 16:10 +0100

csiph-web