Help using Base SAS procedures

How to ask SAS to run a code every 1 hour

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 131
Accepted Solution

How to ask SAS to run a code every 1 hour

Hi sir,

I am thinking to run a piece of code every one hour, up to 5 times. I tried to use the wakeup function, but not worked. Do you know to achieve this task?

Thanks a lot. 


Accepted Solutions
Solution
‎01-04-2012 07:11 AM
Frequent Contributor
Frequent Contributor
Posts: 94

How to ask SAS to run a code every 1 hour

You could probably run your code in a loop, and use the sleep() function to wait until the next relevant time period.  However I'd imagine its probably better to schedule the code to run, either using Scheduled Tasks on Windows, or CRON on unix etc. - it depends on what your setup.

Either way, I suppose you'd also have to be sure that your code takes less than an hour to run!

View solution in original post


All Replies
Solution
‎01-04-2012 07:11 AM
Frequent Contributor
Frequent Contributor
Posts: 94

How to ask SAS to run a code every 1 hour

You could probably run your code in a loop, and use the sleep() function to wait until the next relevant time period.  However I'd imagine its probably better to schedule the code to run, either using Scheduled Tasks on Windows, or CRON on unix etc. - it depends on what your setup.

Either way, I suppose you'd also have to be sure that your code takes less than an hour to run!

Frequent Contributor
Posts: 131

How to ask SAS to run a code every 1 hour

I've put this right now using the sleep() function. Many thanks Smiley Happy

PROC Star
Posts: 7,356

How to ask SAS to run a code every 1 hour

I presume this is for sending out your emails.  If you are on Windows take a look at:

http://analytics.ncsu.edu/sesug/2006/CC04_06.PDF

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 144 views
  • 3 likes
  • 3 in conversation