altering schedules from script?

  • SQL server 2000 std

    windows 2003 std

    Hi all,

    I have a DTS package that is called from a Scheduled task.

    I have a ASP web form that shows stats from the tables on one of my databases.

    what I want to do is give the web user a function to be able to re-schedule the time/ day on the sceduled task from the ASP page... is it possible to alter the Scheduled task using scripts?

    Many thanks in advance!

    Dave

  • Is this an OS scheduled task? I'm sure there is, but it involves giving your privileges on the web that you might not want to do.

    What I'd suggest is that you let them request the alter and store the data in a table. Then have a job come by that picks up the request and makes the change. That way you aren't giving out privileges to a web service.

    If it's SQL Agent, there are stored procs to change things.sp_update_jobschedule, etc.

    Task Scheduler: http://www.codeproject.com/KB/cs/tsnewlib.aspx

  • Thanks Steve,

    yeah its a SQL Server Agent Job, I'd ideally like to have the values saved into a table and just have the scheduled task check the table date...

    wait a minute... I think i've just answered my own question.

    1. Scheduled task runs every 10 minutes and runs a script.

    2. the script checks the table im about to create for a time / date

    3. if within the range, execute the rest of the script..

    thanks Steve..

    ;O)

    Dave

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply