Solved

SQL Trigger to start Windows Scheduled task

Posted on 2010-09-09
6
696 Views
Last Modified: 2012-05-10
Hi Experts, does anyone know if its possible to use a SQL trigger to start a Windows Schedules task. Examples or ideas welcome. I simply want to start a scheduled task when an insert is done in a table.
0
Comment
Question by:takwirirar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 33634621
why would you want to start a windows schedules task?you could create a sql server job, and start that on (sp_start_job) ...
0
 
LVL 1

Author Comment

by:takwirirar
ID: 33634637
Reason: A third party wrote a program for us in JAVA and this is scheduled to run every 10 minutes. Unfortunately the process takes resources whether there are records in the database to process or not. The JAVA runset is run from a batch file that it a scheduled task. If I could get either my ASP.NET program to start the batch file/scheduled task ad-hoc that would save time and resources
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 33634642
you can run java application from sql agent jobs also ...
you define a command line call to the application just as needed (aka a .bat file that does all what is needed)...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:takwirirar
ID: 33634652
So I create a SQL job that runs a batch file. I then create a trigger that runs the SQL job?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 33634694
yes. as posted in the first post, you can use the sp_start_job procedure to start such a job
0
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 500 total points
ID: 33634697
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question