zsh-users
 help / color / mirror / code / Atom feed
* sched waits for next prompt. Does it have to?
@ 1995-10-31 14:42 Henry Ware
  1995-10-31 19:02 ` Richard Coleman
  0 siblings, 1 reply; 4+ messages in thread
From: Henry Ware @ 1995-10-31 14:42 UTC (permalink / raw)
  To: zsh-users

Hi everyone,

zsh is the 5th shell I've used... it is by far my favorite so far
surpassing even tcsh and bash, IMHO.  However, I'm having a little
trouble with the sched commend.  I'd like it to perform the action at
the specified time rather than at the next prompt: for example, when I
want it to act as an alarm clock, or as "at", etc.

I've tried setting the NOTIFY option, which didn't change the behavior.

Is there a solution other than using at or tcsh's sched?

Thanks in advance,
Henry Ware




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

* Re: sched waits for next prompt. Does it have to?
  1995-10-31 14:42 sched waits for next prompt. Does it have to? Henry Ware
@ 1995-10-31 19:02 ` Richard Coleman
  1995-10-31 22:13   ` Rob Hooft
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Coleman @ 1995-10-31 19:02 UTC (permalink / raw)
  To: Henry Ware; +Cc: zsh-users

> zsh is the 5th shell I've used... it is by far my favorite so far
> surpassing even tcsh and bash, IMHO.  However, I'm having a little
> trouble with the sched commend.  I'd like it to perform the action at
> the specified time rather than at the next prompt: for example, when I
> want it to act as an alarm clock, or as "at", etc.
> 
> I've tried setting the NOTIFY option, which didn't change the behavior.
> 
> Is there a solution other than using at or tcsh's sched?

Currently zsh's handling of `sched' and the shell function `periodic'
(if defined) are very simple.  Zsh just checks time stamps in the
function preprompt() and executes scheduled commands or `periodic'
if it has been long enough.  To do anything better would require setting
up signals, etc...   I can add it to the TODO list, but I doubt it
will make it in the next production release.  There are currently just too
many other things to work on.

Richard Coleman
coleman@math.gatech.edu



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

* Re: sched waits for next prompt. Does it have to?
  1995-10-31 19:02 ` Richard Coleman
@ 1995-10-31 22:13   ` Rob Hooft
  1995-11-01  9:14     ` Bas V. de Bakker
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Hooft @ 1995-10-31 22:13 UTC (permalink / raw)
  To: Richard Coleman; +Cc: Henry Ware, zsh-users

>>>>> "RC" == Richard Coleman <coleman@math.gatech.edu> writes:

 >> ... I'm having a little
 >> trouble with the sched commend.  I'd like it to perform the action
 >> at the specified time rather than at the next prompt: for example,
 >> when I want it to act as an alarm clock, or as "at", etc.

 RC> Currently zsh's handling of `sched' and the shell function
 RC> `periodic' (if defined) are very simple.  Zsh just checks time
 RC> stamps in the function preprompt() and executes scheduled
 RC> commands or `periodic' if it has been long enough.  To do
 RC> anything better would require setting up signals, etc...

Isn't it possible to call the periodicals from an ALARM function?  If
not now, then it should be relatively easy to add such functionality?
That would enable one to make "sched" behave like "at" using a smart
ALARM handler and "TMOUT=60".

Rob.

-- 
Rob W. W. Hooft ====== You have a computational protein problem? Try WHAT IF! 
= Rob.Hooft@EMBL-Heidelberg.DE, Meyerhofstr. 1, 69117 Heidelberg, Germany. ==
3.0GS$ d-(?) s: a28 C++ UAIOS++(-) UL++++ P++ L++(+++) E++ W++(-) N++(+++) K?
w-- O? M-(--) V(-) PS PE+ Y+ PGP t 5? X+ R tv+ b+ DI? D+ G+ e++++ h(*) !r !y+


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

* Re: sched waits for next prompt. Does it have to?
  1995-10-31 22:13   ` Rob Hooft
@ 1995-11-01  9:14     ` Bas V. de Bakker
  0 siblings, 0 replies; 4+ messages in thread
From: Bas V. de Bakker @ 1995-11-01  9:14 UTC (permalink / raw)
  To: zsh-users

Rob Hooft <Rob.Hooft@EMBL-Heidelberg.de> writes:

> Isn't it possible to call the periodicals from an ALARM function?
> If not now, then it should be relatively easy to add such
> functionality?  That would enable one to make "sched" behave like
> "at" using a smart ALARM handler and "TMOUT=60".

As I have mentioned before, you could indeed use TMOUT and TRAPALARM
to build an at-like function.  For "periodic", this is relatively
easy, but to make a generic sched thing you would have to maintain
some kind of priority queue.  If someone would hack together a shell
function for this purpose, it would be nice to include it in the
distribution.

For all my purposes, btw, "at" suffices.

Bas.


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

end of thread, other threads:[~1995-11-01  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-10-31 14:42 sched waits for next prompt. Does it have to? Henry Ware
1995-10-31 19:02 ` Richard Coleman
1995-10-31 22:13   ` Rob Hooft
1995-11-01  9:14     ` Bas V. de Bakker

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).