August 10, 2005 at 12:55 pm
Hi,
I have 2 servers:
Server1 - Windows2000 and SQL Server2000
Server2 - Windows2000 (no SQL Server)
I need to start scheduled task job on the Server2 upon completion of the SQL job on Server1. How to do it?
Thank you,
Leon
August 10, 2005 at 1:25 pm
exec msdb..sp_start_job @job_name='job_name', @server_name='server_name'
August 10, 2005 at 2:27 pm
The target server does not have SQL on it.
I need to start scheduled task.
Thanks,
Leon
August 10, 2005 at 10:13 pm
It depends on what your schedule task on the other server is doing? If you have some filesystem related commands being executed on the target server..i would suggest move the task to the server on which you have sql server installed and configure it using a batch file to perform the operations on the target server.
You can then user either osql or sql agent jobs to call the batch file and schedule it as well.
Thanks,
Arzan
August 11, 2005 at 9:18 am
You can use the schtasks command (http://www.ss64.com/nt/schtasks.html is a good reference) to start a scheduled task, even on another server. You'll have to work out the permissions and task ownership so that your SQL Agent has access to the other server and the scheduled tasks.
You'll use xp_cmd on the SQL Server to run the schtasks command, but there may be other ways.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply