Re: Fwd: Re: cron in UTC?
Don Armstrong writes: > On Thu, 09 Oct 2014, lee wrote: >> Tony van der Hoff writes: >> >> > GMT/BST; I just want cron to trigger tasks at a fixed time each day, >> > regardless of localtime. >> >> man cron: >> >>It is possible to use different time zones for crontables. See >>crontab(5) for more information. >> >> man 5 crontab: >> >>The CRON_TZ variable specifies the time zone specific for the > > [...] > > > This is only supported in cronie, a fork of cron which is not the > default cron in Debian (but is present in other distributions.) Sorry, I looked at the Fedora manpages and was unaware that they are using a different cron than Debian does. Wouldn't a script that changes the entries work? -- Hallowed are the Debians! -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87fvewokfg@yun.yagibdah.de
Re: Fwd: Re: cron in UTC?
On Thu, 09 Oct 2014, lee wrote: > Tony van der Hoff writes: > > > GMT/BST; I just want cron to trigger tasks at a fixed time each day, > > regardless of localtime. > > man cron: > >It is possible to use different time zones for crontables. See >crontab(5) for more information. > > man 5 crontab: > >The CRON_TZ variable specifies the time zone specific for the [...] This is only supported in cronie, a fork of cron which is not the default cron in Debian (but is present in other distributions.) [It's currently in experimental only. See #511780 for the bug to switch to it or ISC cron from Vixie cron.] -- Don Armstrong http://www.donarmstrong.com What I can't stand is the feeling that my brain is leaving me for someone more interesting. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141009050735.ge23...@teltox.donarmstrong.com
Re: Fwd: Re: cron in UTC?
Tony van der Hoff writes: > GMT/BST; I just want cron to trigger tasks at a fixed time each day, > regardless of localtime. man cron: It is possible to use different time zones for crontables. See crontab(5) for more information. man 5 crontab: The CRON_TZ variable specifies the time zone specific for the cron table. The user should enter a time according to the specified time zone into the table. The time used for writing into a log file is taken from the local time zone, where the daemon is running. I guess you could run a (perl) script that changes CRON_TZ in your cron table(s) whenever you change the time zone you're in. Or you could run a script that changes the times in the entries. Since the docstrings say that cron either uses inotify or checks the tables every minute, I would think that you're not limited to 'crontab -e' for modifying the tables. -- Hallowed are the Debians! -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/874mvenm2e@yun.yagibdah.de
Re: Fwd: Re: cron in UTC?
On Thu, 02 Oct 2014, Jonathan Dowland wrote: > On Thu, Oct 02, 2014 at 09:29:35PM +0900, Joel Rees wrote: > > There's the real problem, and the one that has stopped me in the past -- > > hardware to set up the dev and test environments. The hardware I have might > > be able to handle chroots, but it won't do VMs. Too old. > > LXC is worth a look. And also Xen. It used to work on my T43 (which is a Pentium-M with 2GiB RAM) a long time ago. It has been many years since I last tried that, though. Worse comes to worst, someone else could take care of the systemd + se-linux testing. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141002134416.gd...@khazad-dum.debian.net
Re: Fwd: Re: cron in UTC?
On Thu, Oct 02, 2014 at 09:29:35PM +0900, Joel Rees wrote: > There's the real problem, and the one that has stopped me in the past -- > hardware to set up the dev and test environments. The hardware I have might > be able to handle chroots, but it won't do VMs. Too old. LXC is worth a look. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141002130134.GA26004@debian
Re: Fwd: Re: cron in UTC?
2014/10/01 21:29 "Henrique de Moraes Holschuh" : > > On Wed, 01 Oct 2014, Joel Rees wrote: > > Should I use this as my excuse to actually join the dev team, in spite of > > my misgivings about systemd and the API creep? > > Only if you promisse me you are never going to mention systemd again on the > communication threads where fcron work is taking place, except for the bare > minimum actually related to fcron. Heh. No, that wouldn't really be a problem. > It will need a service file and an > initscript because it has to be started on boot by both systemd and > sysvinit. > > What is a lot more troublesome is that someone in the team will need to test > it SELinux mode. And if Debian ever adds AppArmor, fcron will have to > interface to it as well. cron-like daemons are security-sensitive packages. > > > Is your third going to need to run jessie with systemd? How much and what > > kind of hardware/OS resources does he or she need to be able to bring to > > the table? > > You will need an unstable chroot, and you must test the packages there, as > that's the maint target for integration. This doesn't mean your main system > must run unstable. IME chroots and VMs are enough to deal with this. > > And yes, it has to be tested with systemd and sysvinit, in both cases with > SELinux enabled. There's the real problem, and the one that has stopped me in the past -- hardware to set up the dev and test environments. The hardware I have might be able to handle chroots, but it won't do VMs. Too old. Guess I was thinking maybe there would be something I could do in an alternate boot partition on an older 32 bit machine. I have to do something about my hardware, but I don't have the extra money at this point. > So, it is a reasonable amount of work to do it properly. THIS is why I am > very upfront about the fact that it needs several maintainers with time to > spend on it, and that I won't be able to do much other than coordinate right > now. > > We can very reasonably expect the time sink to get a lot better after the > package shapes up, as fcron development is slow (and it looks like it has > picked up some, so it is out of maintenance-only mode!). It is also pretty > clear we have to track upstream development closely, and cherry-pick patches > from the ML. > > However, I do recall that maintaining fcron packages was a lot of fun. Yeah. > You > *really* grow as a maintainer when you take care of something like that. > And fcron is a real cool piece of software, although I expect that other > rather nice vixie-cron replacements must have matured in the last 10 years, > so it would also make sense to check the competition first, before spending > a lot of maintainer resources to reintroduce fcron in Debian. Well, maybe some one on the user list with more free resources than I could get up for some fun. Joel Rees
Re: Fwd: Re: cron in UTC?
On Wed, 01 Oct 2014, Joel Rees wrote: > Should I use this as my excuse to actually join the dev team, in spite of > my misgivings about systemd and the API creep? Only if you promisse me you are never going to mention systemd again on the communication threads where fcron work is taking place, except for the bare minimum actually related to fcron. It will need a service file and an initscript because it has to be started on boot by both systemd and sysvinit. What is a lot more troublesome is that someone in the team will need to test it SELinux mode. And if Debian ever adds AppArmor, fcron will have to interface to it as well. cron-like daemons are security-sensitive packages. > Is your third going to need to run jessie with systemd? How much and what > kind of hardware/OS resources does he or she need to be able to bring to > the table? You will need an unstable chroot, and you must test the packages there, as that's the maint target for integration. This doesn't mean your main system must run unstable. IME chroots and VMs are enough to deal with this. And yes, it has to be tested with systemd and sysvinit, in both cases with SELinux enabled. So, it is a reasonable amount of work to do it properly. THIS is why I am very upfront about the fact that it needs several maintainers with time to spend on it, and that I won't be able to do much other than coordinate right now. We can very reasonably expect the time sink to get a lot better after the package shapes up, as fcron development is slow (and it looks like it has picked up some, so it is out of maintenance-only mode!). It is also pretty clear we have to track upstream development closely, and cherry-pick patches from the ML. However, I do recall that maintaining fcron packages was a lot of fun. You *really* grow as a maintainer when you take care of something like that. And fcron is a real cool piece of software, although I expect that other rather nice vixie-cron replacements must have matured in the last 10 years, so it would also make sense to check the competition first, before spending a lot of maintainer resources to reintroduce fcron in Debian. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141001122858.ga24...@khazad-dum.debian.net
Re: Fwd: Re: cron in UTC?
2014/09/30 21:41 "Henrique de Moraes Holschuh" : > > On Tue, 30 Sep 2014, Tony van der Hoff wrote: > > On 30/09/14 11:57, Henrique de Moraes Holschuh wrote: > > > On Mon, 29 Sep 2014, Don Armstrong wrote: > > >> On Mon, 29 Sep 2014, John Hasler wrote: > > >>> Tony van der Hoff writes: > > Believe me; I've beaten that man to death, but not found the answer. > > Perhaps you'd like to give a more detailed pointer into that manual? > > >>> > > >>> See the part about setting environment variables. You should be able to > > >>> set TZ=UTC . > > >> > > >> This sets the environmental variable for the shell forked by cron, but > > >> doesn't change the environmental variable for evaluating the crontab > > >> time specifications. [It's probably past time for cron to be replaced > > >> with fcron or similar, but cron+anacrontab seems to work well enough for > > >> most people that it hasn't happened. fcron used to be in Debian, but got > > >> removed because it was unmaintained in Debian (and upstream at the > > >> time).] > > > > > > I used to maintain fcron in Debian, however SELinux support was not upstream > > > yet, broke, and I had no time to fix it. Russell Coker tried to help giving > > > me an account on a SELinux box, but the real problem was that more human > > > power was needed, and the RFH bug received no response. > > > > > > So I ended up agreeing that it should be removed, because the package was > > > bitrotting fast. > > > > > > Reintroducing fcron in Debian will require some work to be done properly, > > > and past history tells me to not do it at all unless we have at least > > > *three* people willing to enter team maintainership commited to the effort. > > > > > > upstream is friendly, but fcron is in maintenance mode. If you want > > > anything done, you will have to write the code and submit upstream. > > > > I've just cloned the repository from upstream; it looks sensible, so if > > you're willing to coordinate it, I'm willing to devote some time to help > > maintain the Debian effort. > > I could do not much more than coordinate it at this point, so I suggest we > find a third person before any uploads are done. > > You'll want to get the last Debian fcron package to inspect the local > changes and parametrization, some of it will have to be modernized and > forward-ported to recent fcron. > > http://snapshot.debian.org/package/fcron/3.0.1-1.3/ > > We'll have to dig out the old bug reports from the BTS as well, some of them > have to be addressed before the package is reintroduced to unstable. > Unfortunately, since the bugs were "auto-closed" by the fcron removal, we > have to go over all of them and reopen those that would still apply. > > https://bugs.debian.org/cgi-bin/pkgreport.cgi?archive=both;src=fcron;dist=unstable > Should I use this as my excuse to actually join the dev team, in spite of my misgivings about systemd and the API creep? Is your third going to need to run jessie with systemd? How much and what kind of hardware/OS resources does he or she need to be able to bring to the table? Joel Rees Computer memory is just fancy paper, CPUs just fancy pens. All is a stream of text flowing from the past into the future.
Re: Fwd: Re: cron in UTC?
On Tue, 30 Sep 2014, Tony van der Hoff wrote: > On 30/09/14 11:57, Henrique de Moraes Holschuh wrote: > > On Mon, 29 Sep 2014, Don Armstrong wrote: > >> On Mon, 29 Sep 2014, John Hasler wrote: > >>> Tony van der Hoff writes: > Believe me; I've beaten that man to death, but not found the answer. > Perhaps you'd like to give a more detailed pointer into that manual? > >>> > >>> See the part about setting environment variables. You should be able to > >>> set TZ=UTC . > >> > >> This sets the environmental variable for the shell forked by cron, but > >> doesn't change the environmental variable for evaluating the crontab > >> time specifications. [It's probably past time for cron to be replaced > >> with fcron or similar, but cron+anacrontab seems to work well enough for > >> most people that it hasn't happened. fcron used to be in Debian, but got > >> removed because it was unmaintained in Debian (and upstream at the > >> time).] > > > > I used to maintain fcron in Debian, however SELinux support was not upstream > > yet, broke, and I had no time to fix it. Russell Coker tried to help giving > > me an account on a SELinux box, but the real problem was that more human > > power was needed, and the RFH bug received no response. > > > > So I ended up agreeing that it should be removed, because the package was > > bitrotting fast. > > > > Reintroducing fcron in Debian will require some work to be done properly, > > and past history tells me to not do it at all unless we have at least > > *three* people willing to enter team maintainership commited to the effort. > > > > upstream is friendly, but fcron is in maintenance mode. If you want > > anything done, you will have to write the code and submit upstream. > > I've just cloned the repository from upstream; it looks sensible, so if > you're willing to coordinate it, I'm willing to devote some time to help > maintain the Debian effort. I could do not much more than coordinate it at this point, so I suggest we find a third person before any uploads are done. You'll want to get the last Debian fcron package to inspect the local changes and parametrization, some of it will have to be modernized and forward-ported to recent fcron. http://snapshot.debian.org/package/fcron/3.0.1-1.3/ We'll have to dig out the old bug reports from the BTS as well, some of them have to be addressed before the package is reintroduced to unstable. Unfortunately, since the bugs were "auto-closed" by the fcron removal, we have to go over all of them and reopen those that would still apply. https://bugs.debian.org/cgi-bin/pkgreport.cgi?archive=both;src=fcron;dist=unstable -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140930124058.gc10...@khazad-dum.debian.net
Re: Fwd: Re: cron in UTC?
On 30/09/14 11:57, Henrique de Moraes Holschuh wrote: > On Mon, 29 Sep 2014, Don Armstrong wrote: >> On Mon, 29 Sep 2014, John Hasler wrote: >>> Tony van der Hoff writes: Believe me; I've beaten that man to death, but not found the answer. Perhaps you'd like to give a more detailed pointer into that manual? >>> >>> See the part about setting environment variables. You should be able to >>> set TZ=UTC . >> >> This sets the environmental variable for the shell forked by cron, but >> doesn't change the environmental variable for evaluating the crontab >> time specifications. [It's probably past time for cron to be replaced >> with fcron or similar, but cron+anacrontab seems to work well enough for >> most people that it hasn't happened. fcron used to be in Debian, but got >> removed because it was unmaintained in Debian (and upstream at the >> time).] > > I used to maintain fcron in Debian, however SELinux support was not upstream > yet, broke, and I had no time to fix it. Russell Coker tried to help giving > me an account on a SELinux box, but the real problem was that more human > power was needed, and the RFH bug received no response. > > So I ended up agreeing that it should be removed, because the package was > bitrotting fast. > > Reintroducing fcron in Debian will require some work to be done properly, > and past history tells me to not do it at all unless we have at least > *three* people willing to enter team maintainership commited to the effort. > > upstream is friendly, but fcron is in maintenance mode. If you want > anything done, you will have to write the code and submit upstream. > I've just cloned the repository from upstream; it looks sensible, so if you're willing to coordinate it, I'm willing to devote some time to help maintain the Debian effort. -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/542a9ac7.1020...@vanderhoff.org
Re: Fwd: Re: cron in UTC?
On Mon, 29 Sep 2014, Don Armstrong wrote: > On Mon, 29 Sep 2014, John Hasler wrote: > > Tony van der Hoff writes: > > > Believe me; I've beaten that man to death, but not found the answer. > > > Perhaps you'd like to give a more detailed pointer into that manual? > > > > See the part about setting environment variables. You should be able to > > set TZ=UTC . > > This sets the environmental variable for the shell forked by cron, but > doesn't change the environmental variable for evaluating the crontab > time specifications. [It's probably past time for cron to be replaced > with fcron or similar, but cron+anacrontab seems to work well enough for > most people that it hasn't happened. fcron used to be in Debian, but got > removed because it was unmaintained in Debian (and upstream at the > time).] I used to maintain fcron in Debian, however SELinux support was not upstream yet, broke, and I had no time to fix it. Russell Coker tried to help giving me an account on a SELinux box, but the real problem was that more human power was needed, and the RFH bug received no response. So I ended up agreeing that it should be removed, because the package was bitrotting fast. Reintroducing fcron in Debian will require some work to be done properly, and past history tells me to not do it at all unless we have at least *three* people willing to enter team maintainership commited to the effort. upstream is friendly, but fcron is in maintenance mode. If you want anything done, you will have to write the code and submit upstream. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140930105707.gb10...@khazad-dum.debian.net
Re: Fwd: Re: cron in UTC?
On Mon, 29 Sep 2014, John Hasler wrote: > Tony van der Hoff writes: > > Believe me; I've beaten that man to death, but not found the answer. > > Perhaps you'd like to give a more detailed pointer into that manual? > > See the part about setting environment variables. You should be able to > set TZ=UTC . This sets the environmental variable for the shell forked by cron, but doesn't change the environmental variable for evaluating the crontab time specifications. [It's probably past time for cron to be replaced with fcron or similar, but cron+anacrontab seems to work well enough for most people that it hasn't happened. fcron used to be in Debian, but got removed because it was unmaintained in Debian (and upstream at the time).] -- Don Armstrong http://www.donarmstrong.com I would like to be the air that inhabits you for a moment only. I would like to be that unnoticed & that necessary. -- Margaret Atwood "Poetry in Motion" p140 -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140929183111.gc14...@rzlab.ucr.edu
Re: Fwd: Re: cron in UTC?
On Mon, Sep 29, 2014 at 05:13:48PM +0100, Lisi Reisz wrote: > On Monday 29 September 2014 17:01:31 Tony van der Hoff wrote: > > well, it's my understanding that the system (hardware) time is always > > UTC, but there is no way to set localtime to GMT (or UTC). Perhaps I'm > > misunderstanding you. > > Erm What do you think we who live near Greenwich do??? At least you don't miss out on an hours sleep every spring! :) -- "If you're not careful, the newspapers will have you hating the people who are being oppressed, and loving the people who are doing the oppressing." --- Malcolm X -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140930015248.GD13257@tal
Re: Fwd: Re: cron in UTC?
On Monday 29 September 2014 17:50:59 Tony van der Hoff wrote: > I think you do dpkg-reconfigure tzdata, and select Europe/London. There > is no option for GMT, specifically. Thus you get the twice-yearly hassle > of DST. Ah! I configure localtime via my DE (TDE) and get the option of whether I want BST or not. Thus, I could have GMT all year (I think - I have never wanted it). Sorry, I couldn't resist the statement that GMT isn't possible in localtime! Even by your reckoniong you get it from October 31st to March 31st every year. Lisi -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/201409292219.58602.lisi.re...@gmail.com
Re: Fwd: Re: cron in UTC?
Put your tasks in /etc/crontab and set the system time to UTC. Use each user's TZ variable to set time zones for them. -- John Hasler jhas...@newsguy.com Elmwood, WI USA -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87oaty5mkk@thumper.dhh.gt.org
Re: Fwd: Re: cron in UTC?
On 29/09/14 17:13, Lisi Reisz wrote: On Monday 29 September 2014 17:01:31 Tony van der Hoff wrote: well, it's my understanding that the system (hardware) time is always UTC, but there is no way to set localtime to GMT (or UTC). Perhaps I'm misunderstanding you. Erm What do you think we who live near Greenwich do??? Set our software time zone to Western European Time, which is only the same as GMT in winter. (My desktop PC's hardware clock is also in WET, since I have a Linux/Windows dual boot system and Windows can't be relied on to play nice if the hardware clock doesn't reflect local civil time.) -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54299e45.7070...@zen.co.uk
Re: Fwd: Re: cron in UTC?
On 29/09/14 17:29, John Hasler wrote: > Tony van der Hoff writes: >> Believe me; I've beaten that man to death, but not found the answer. >> Perhaps you'd like to give a more detailed pointer into that manual? > > See the part about setting environment variables. You should be able to > set TZ=UTC . > No, that sets the timezone passed to the task invoked bt cron; not the timezone cron uses to schedule tasks. >From man crontab: LIMITATIONS: The cron daemon runs with a defined timezone. It currently does not support per-user timezones. All the tasks: system's and user's will be run based on the configured timezone. Even if a user specifies the TZ environment variable in his crontab this will affect only the commands executed in the crontab, not the execution of the crontab tasks themselves. Thanks, anyway, for the suggestion. -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54299acb.9000...@vanderhoff.org
Re: Fwd: Re: cron in UTC?
Tony van der Hoff writes: > Believe me; I've beaten that man to death, but not found the answer. > Perhaps you'd like to give a more detailed pointer into that manual? See the part about setting environment variables. You should be able to set TZ=UTC . -- John Hasler jhas...@newsguy.com Elmwood, WI USA -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87sija5o9a@thumper.dhh.gt.org
Re: Fwd: Re: cron in UTC?
On 29/09/14 17:30, Don Armstrong wrote: > On Mon, 29 Sep 2014, Tony van der Hoff wrote: >>> On Wed, 24 Sep 2014 11:54:57 +0100 >> On 24/09/14 16:01, Don Armstrong wrote: >>> My #1 suggestion is to have system time be GMT, and every shell/user set >>> TZ appropriately. That's basically the only sane setting, as many time >>> zones do DST (and change the rules for it from time to time). >> >> well, it's my understanding that the system (hardware) time is always >> UTC, but there is no way to set localtime to GMT (or UTC). Perhaps I'm >> misunderstanding you. > > There are two different clocks here; there's the system clock which is > kept by the kernel, which can be in any timezone, and the hardware clock > which is kept by the motherboard, which is typically in UTC on unix > machines. > OK. Understood. > To switch the system time, just run > > dpkg-reconfigure tzdata; # as root > > and then select None, then UTC. Voila, your system time is now in UTC. > Thank you; I hadn't spotted that 'None' entry. >> That would be nice, but there does not appear to be any way to do >> that. > > There actually is; you edit /etc/pam.d/cron and add a line like > > session required pam_env.so envfile=/etc/default/cron_locale > > and add a /etc/default/cron/locale with TZ="UTC". > > But that's complicated. > OK, I'll investigate that; thanks for the info. -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54299417.40...@vanderhoff.org
Re: Fwd: Re: cron in UTC?
On 29/09/14 17:48, John Hasler wrote: > Tony van der Hoff writes: >> My problem is that cron works to localtime. I want my cron tasks to be >> triggered at the same time (UTC) each day, regardless of the current >> localtime, wherever I may be. > > man 5 crontab > Believe me; I've beaten that man to death, but not found the answer. Perhaps you'd like to give a more detailed pointer into that manual? -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54299014.7020...@vanderhoff.org
Re: Fwd: Re: cron in UTC?
On 29/09/14 17:13, Lisi Reisz wrote: > On Monday 29 September 2014 17:01:31 Tony van der Hoff wrote: >> well, it's my understanding that the system (hardware) time is always >> UTC, but there is no way to set localtime to GMT (or UTC). Perhaps I'm >> misunderstanding you. > > Erm What do you think we who live near Greenwich do??? > Is Buckingham (1°W; see .sig) close enough, Lisi? I think you do dpkg-reconfigure tzdata, and select Europe/London. There is no option for GMT, specifically. Thus you get the twice-yearly hassle of DST. I believe you can define your own timezone, based on UTC+0, and fix localtime to this. But that's not really the point. I'm quite happy with localtime being GMT/BST; I just want cron to trigger tasks at a fixed time each day, regardless of localtime. Surely, someone else must have encountered, and solved, this dilemma? -- Tony van der Hoff| mailto:t...@vanderhoff.org Buckinghamshire, England | -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54298df3.5060...@vanderhoff.org
Re: Fwd: Re: cron in UTC?
Tony van der Hoff writes: > My problem is that cron works to localtime. I want my cron tasks to be > triggered at the same time (UTC) each day, regardless of the current > localtime, wherever I may be. man 5 crontab -- John Hasler jhas...@newsguy.com Elmwood, WI USA -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87wq8m5q55@thumper.dhh.gt.org
Re: Fwd: Re: cron in UTC?
Lisi Reisz wrote on 09/29/2014 12:13:48 PM: > On Monday 29 September 2014 17:01:31 Tony van der Hoff wrote: > > well, it's my understanding that the system (hardware) time is always > > UTC, but there is no way to set localtime to GMT (or UTC). Perhaps I'm > > misunderstanding you. > > Erm What do you think we who live near Greenwich do??? > > Lisi I don't think the system time is always UTC. The 'time' function, for example, seems to return an epoch time in the system's localtime. So, for example, if one's localtime is EDT, 'time' returns the number of seconds since Jan. 1, 1970 (eastern time zone). Joe
Re: Fwd: Re: cron in UTC?
On Mon, 29 Sep 2014, Tony van der Hoff wrote: > > On Wed, 24 Sep 2014 11:54:57 +0100 > On 24/09/14 16:01, Don Armstrong wrote: > > My #1 suggestion is to have system time be GMT, and every shell/user set > > TZ appropriately. That's basically the only sane setting, as many time > > zones do DST (and change the rules for it from time to time). > > well, it's my understanding that the system (hardware) time is always > UTC, but there is no way to set localtime to GMT (or UTC). Perhaps I'm > misunderstanding you. There are two different clocks here; there's the system clock which is kept by the kernel, which can be in any timezone, and the hardware clock which is kept by the motherboard, which is typically in UTC on unix machines. To switch the system time, just run dpkg-reconfigure tzdata; # as root and then select None, then UTC. Voila, your system time is now in UTC. > That would be nice, but there does not appear to be any way to do > that. There actually is; you edit /etc/pam.d/cron and add a line like session required pam_env.so envfile=/etc/default/cron_locale and add a /etc/default/cron/locale with TZ="UTC". But that's complicated. -- Don Armstrong http://www.donarmstrong.com "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140929163047.gi8...@teltox.donarmstrong.com
Re: Fwd: Re: cron in UTC?
On Monday 29 September 2014 17:01:31 Tony van der Hoff wrote: > well, it's my understanding that the system (hardware) time is always > UTC, but there is no way to set localtime to GMT (or UTC). Perhaps I'm > misunderstanding you. Erm What do you think we who live near Greenwich do??? Lisi -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/201409291713.48212.lisi.re...@gmail.com