09-05-2017 10:35 AM
I'm working with scheduling jobs in SMC. I want to send a mail or receive an alert for the failed job and was wondering if there is such feutures for scheduled jobs(in SMC)? Or should I write a separate sas program for scheduled jobs to send a mail?
I read some information that there is such alert for SAS work directory and server log file.
09-05-2017 11:02 AM
On SMC you can scheduler you SAS Jobs, but you have no resource for controlling the jobs behavior.
You'll to use a SAS program to send e-mails depending the job's state
09-05-2017 11:36 AM
Hi Riana -
Have you considered scheduling on the OS and integrating the organization's smtp server for notifications? You can do this easily on Linux OS by editing your contab entry (using the sas install account).
su to SAS account:
~ sudo su -l sas
open in VI:
~ crontab -e
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
Then create an alias in etc/aliases for the distro list:
sasadmins: email@example.com,firstname.lastname@example.org, etc...
Then run newaliases to update the database.
Hope this helps