sometime I need to kill an program which does not continue to process data, and i sheduled a job to do that. After lots of times' try, I made it at last.
This script add a shedule to the sheduled task list, one minutes later then the current system time. You can change it by edit the @RunTime string,
And this is my first Script submitted, I hope it help.
The most core part is below:
When doing bulk data changes it may be beneficial to disable indexes prior to starting the operation. Fortunately, SQL's rich metadata makes this very easy to automate in a robust fashion.