Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8944

Re: how to send out email from table data every day?

$
0
0

You can use the Job Scheduler functionality within ASE or a UNIX OS cron job to cause something to happen at a particular time every day.

 

With Job Scheduler, you might have it use xp_cmdshell to execute a script on the OS,

while cron would just execute the script directly.

 

The script would log into ASE, run the select and store the results into a file, then send the file contents.

 

A simple example of such a script file might be:

 

------

isql -Usa -Ppassword -o /work/my_output.txt  << EOF

select * from mydb..mystatus

go

EOF

mailx -s"My Daily Status" bret < /work/my_output.txt

------

 

As the file contains your password, be sure permissions are set so only you can read and execute the file.


Viewing all articles
Browse latest Browse all 8944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>