Calling the Windows Task Scheduler from SQL Server
I have a print process that runs on a separate server from our database server and it is controlled by the Windows Task Scheduler. Currently, the SQL Job runs on the database server and queues up the print file, then at 7:00 AM a Windows Task runs on the print server and prints all files in the print queue. I would like to call that Windows task from the SQL job. The idea is to print files as the job finishes instead of queueing up multiple files. The SQL job runs on a SQL Server 2000. Is there a way to call the Task Scheduler on the print server? Any help would be appreciated.
From within SQL Server 2000, your only real option is a command line call. You could do that from SQL Agent very easily or, not a good option in any way because it requires serious security exposure, you could look to xp_cmdshell. I don't recommend that. You'd be much better off using SQL Agent.