LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2011, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 27 Sep 2011 16:20:06 -0700
Reply-To:   "Pardee, Roy" <pardee.r@GHC.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Pardee, Roy" <pardee.r@GHC.ORG>
Subject:   Re: Running SAS automatically
In-Reply-To:   <D47ACC3DC1D6CA4D85DE61DC39DA319F06317E62@EX10MAIL2.westat.com>
Content-Type:   text/plain; charset="us-ascii"

Here's what I do:

http://www.sascommunity.org/wiki/Run_SAS_programs_from_a_scheduled_task_on_windows

Or if that breaks:

http://goo.gl/qjzR1

One thing to be conscious of is things like drive mappings that get set in login scripts. Scheduled jobs don't have that environment set up. I tend to just use UNCs.

HTH,

-Roy

Roy Pardee | DATA WRANGLER Group Health Research Institute

PHONE 360-447-8773 | 206-287-2078 E-MAIL pardee.r@ghc.org www.grouphealthresearch.org -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Mike Rhoads Sent: Tuesday, September 27, 2011 8:14 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Running SAS automatically

In addition to Michael's excellent suggestions, you may want to refer to the following paper from this spring's SAS Global Forum conference: http://support.sas.com/resources/papers/proceedings11/005-2011.pdf

While You Were Sleeping, SAS(r) Was Hard At Work, by Andrea Wainwright-Zimmerman

Includes screen shots, nice discussion of some possible pitfalls, etc.

Mike Rhoads RhoadsM1@Westat.com

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Michael Davis Sent: Tuesday, September 27, 2011 11:03 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Running SAS automatically

Hello Friends,

Assuming that you are running this under some flavor of Windows, you need to do two things:

1. Encapsulate your job so it runs in batch. You may have to invest some time in script, SCL, or macro code to make it fully automatic. Remember that you cannot run any procedures that are expecting to have interaction with the screen [or you need some options like -noterminal].

2. Set up a scheduled task or use another job scheduler. Depending upon your set-up, you need launch the job from the machine that executes SAS if you have the ability to send jobs to execute SAS remotely.

Given that it runs when you are not there, you probably want this job to send an email message to you or someone else that says that it ran okay [or not] and which attaches any output that you might wish to examine. If the job fails badly, you won't get a message so you may want to encapsulate it in another program that reads the status of the core job and sends out the email no matter what.

The SAS Companion will document how to launch SAS tasks in batch mode, which I do often even when I am sitting next to my computer.

Best wishes,

Michael

> No ideas from me, but I want to know, too :) > > Cindy Durrett > > FSAC / CIB > > 410-7141 > > > > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of sas > quest > Sent: Tuesday, September 27, 2011 10:33 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: [SAS-L] Running SAS automatically > > Hi, > > Anyone knows how to schedule a SAS program to run automatically at a > particular point of time in the day every day - like @6am daily? I know we > can schedule a task in windows to run the SAS prog but I would guess its > just opens it in SAS and we would still need to hit the 'running man' > button > to actually execute it. Any ideas? > > > Thanks >

-- Michael L. Davis Ambler, PA email: Michael.Davis@alumni.duke.edu

Group Health is people-powered. Learn more at http://www.ghc.org/annualmeeting

GHC Confidentiality Statement

This message and any attached files might contain confidential information protected by federal and state law. The information is intended only for the use of the individual(s) or entities originally named as addressees. The improper disclosure of such information may be subject to civil or criminal penalties. If this message reached you in error, please contact the sender and destroy this message. Disclosing, copying, forwarding, or distributing the information by unauthorized individuals or entities is strictly prohibited by law.


Back to: Top of message | Previous page | Main SAS-L page