Xref: utzoo comp.sys.sequent:873 comp.unix.questions:29332 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.sys.sequent,comp.unix.questions Subject: Re: Time Syncing Keywords: Symmetry 27 Message-ID: <1991Mar11.013713.2105@athena.mit.edu> Date: 11 Mar 91 01:37:13 GMT References: <27daccc2.539b@petunia.CalPoly.EDU> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 23 In article <27daccc2.539b@petunia.CalPoly.EDU>, guy@library.calpoly.edu (Guy Martin) writes: |> I have a problem I am hoping someone out there can give me some help on. |> I am trying to sync our system time (Symmetry 27) with another local |> host. I have tried using a shell script I wrote that simply telnets |> to the said host's telnet port 13 to return their time stamp. This |> works fine when I run it as root from a terminal. However, cron |> spits it out as telnet requires a controlling tty to be present to |> execute correctly. 1) You can write a program to connect to port 13 on the remote host and get the time string; using telnet is overkill. Then you avoid the problem of telnet requiring a tty to run on. If you don't want to write the program, we have one at Athena for which I can send you the sources, although I don't guarantee it'll compile on your system. 2) You can use the "pty" package to get telnet to run from cron. Available at a comp.sources.unix archive site near you. -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710