zsh-users
 help / color / mirror / code / Atom feed
* sched behaviour: execute only after <return>
@ 2006-11-24 10:27 holger.dinkel
  2006-11-24 10:47 ` Nikolai Weibull
  2006-11-24 11:35 ` Peter Stephenson
  0 siblings, 2 replies; 5+ messages in thread
From: holger.dinkel @ 2006-11-24 10:27 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]

Hello List,

i was wondering if the behaviour of 'sched' was what everybody
expects: At least i was startled, when i found out, that it does not
"really" schedule my jobs...

an example:

 > sched +0:01 date +%R

should wait one minute and then print the current date. As long as i
don't use the shell, i don't get a feedback (no output from 'date'). I
have f.i. to press <enter>. This is perfectly fine for me.  
However, the result from 'date' is not what i expected:

assume it was exactly high noon, when i typed in the command from above:

 12:00> sched +0:01 date +%R

then i would wait for exactly two minutes until i press <return>. I would 
think the 'date' command was executed at 12:01 and be printed at 12:02:

 
 12:02> <pressing enter>
   12:01

instead i get:
 
 12:02> "pressing enter>
   12:02

which means, that the 'date' command was executed NOT at 12:01 but at 12:02!

[i hope this example isn't too confusing... ;-} ]

Can someone please tell me if and how this behaviour can be changed?

I mean, what good is a scheduling service if i need to be around to
press a key to trigger it???

How do you guys schedule your jobs?

Many thanks in advance!


Holger


PS: zsh ROCKS!

PPS:

> zsh --version
zsh 4.3.2 (i686-pc-linux-gnu)

i have (amongst others) the following options set in my .zshrc:
setopt MONITOR
setopt NOTIFY 

... but i have also tried it without these...without success.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sched behaviour: execute only after <return>
  2006-11-24 10:27 sched behaviour: execute only after <return> holger.dinkel
@ 2006-11-24 10:47 ` Nikolai Weibull
  2006-11-24 11:35 ` Peter Stephenson
  1 sibling, 0 replies; 5+ messages in thread
From: Nikolai Weibull @ 2006-11-24 10:47 UTC (permalink / raw)
  To: holger.dinkel, zsh-users

On 11/24/06, holger.dinkel@gmail.com <holger.dinkel@gmail.com> wrote:

> I mean, what good is a scheduling service if i need to be around to
> press a key to trigger it???

Well, it depends, of course, but I guess it could respect the NOTIFY setting.

> How do you guys schedule your jobs?

At(P) is an alternative, see http://ftp.debian.org/debian/pool/main/a/at/.

  nikolai


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sched behaviour: execute only after <return>
  2006-11-24 10:27 sched behaviour: execute only after <return> holger.dinkel
  2006-11-24 10:47 ` Nikolai Weibull
@ 2006-11-24 11:35 ` Peter Stephenson
  2006-11-24 14:09   ` holger.dinkel
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 2006-11-24 11:35 UTC (permalink / raw)
  To: zsh-users

On Fri, 24 Nov 2006 11:27:44 +0100
holger.dinkel@gmail.com wrote:
>  > sched +0:01 date +%R
> 
> should wait one minute and then print the current date. As long as i
> don't use the shell, i don't get a feedback (no output from 'date'). I
> have f.i. to press <enter>. This is perfectly fine for me.  

This is fixed in the latest (unreleased) version of the shell.
Your second problem is basically the same thing: the command
is only executed at the point where you hit return, too.

Note that even in the fixed version the shell must be inactive
for the scheduled event to happen; if there's some foreground
event it will block it.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sched behaviour: execute only after <return>
  2006-11-24 11:35 ` Peter Stephenson
@ 2006-11-24 14:09   ` holger.dinkel
  2006-11-24 15:50     ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: holger.dinkel @ 2006-11-24 14:09 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

Hello Peter,

thanks for your reply!

* Peter Stephenson schrieb am 24/11/06 11:35 +0000:
> On Fri, 24 Nov 2006 11:27:44 +0100
> 
> This is fixed in the latest (unreleased) version of the shell.
> Your second problem is basically the same thing: the command
> is only executed at the point where you hit return, too.

oh cool. So i think i'll just sit and wait with fingers crossed for the
next release to hit in... ;-}
so that would be version 4.3.3?

> Note that even in the fixed version the shell must be inactive for the
> scheduled event to happen; if there's some foreground event it will
> block it.

That's a good thing to know, but shouldn't be a problem...

thanks again!

Holger

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: sched behaviour: execute only after <return>
  2006-11-24 14:09   ` holger.dinkel
@ 2006-11-24 15:50     ` Peter Stephenson
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 2006-11-24 15:50 UTC (permalink / raw)
  To: zsh-users

holger.dinkel@gmail.com wrote:
> > This is fixed in the latest (unreleased) version of the shell.
> > Your second problem is basically the same thing: the command
> > is only executed at the point where you hit return, too.
> 
> oh cool. So i think i'll just sit and wait with fingers crossed for the
> next release to hit in... ;-}
> so that would be version 4.3.3?

Yes, but don't hold your breath... the multibyte support and knock-on
effects is taking quite a while to get right, and I'd like it basically
working by then.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-24 15:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-24 10:27 sched behaviour: execute only after <return> holger.dinkel
2006-11-24 10:47 ` Nikolai Weibull
2006-11-24 11:35 ` Peter Stephenson
2006-11-24 14:09   ` holger.dinkel
2006-11-24 15:50     ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).