Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

If I have a script (on an NT server) that checks web links how can I get the script to run once a day like a cron job in unix. Basically I want it to kick off the script automatically on the NT server at a certain time each day. Right now the script sends me back the bad links to my DOS screen. If I could make it run once a day I would like it to send me an email with the output or write it to a log file. Please advise.
  • Comment on Daily script kickoff and output question

Replies are listed 'Best First'.
Re: Daily script kickoff and output question
by gav^ (Curate) on Feb 25, 2002 at 23:18 UTC
    Look up the at command. This link should help.

    gav^

      Thanks, I appreciate all of your replies!
Re: Daily script kickoff and output question
by screamingeagle (Curate) on Feb 25, 2002 at 23:39 UTC
Re: Daily script kickoff and output question
by petral (Curate) on Feb 25, 2002 at 23:21 UTC
    (as gav^ just said: )Check out AT in dos.   Then look at "My Computer"-> "Scheduled Tasks".   You can redirect to a file same as unix ( > x:\full\path\logfile 2>&1).   And that's it (that's really it, you can't do much of anything else as far as I know!).

      p
      I tried and was able to schedule job but no output showed on the DOS screen at the time the job was suppose to work. I also tried to output it to a file and still no luck. Anyone ever successfully schedule a job using 'at' in NT? Anyone ever get a successful output on screen and in an output file?
        Only to a file by using redirection and absolute file names.

          p
Re: Daily script kickoff and output question
by perrin (Chancellor) on Feb 26, 2002 at 00:05 UTC
    I do this on a Win2000 machine using the scheduled tasks feature and Mail::Sendmail. Very easy to use.