How to customize sql server agent jobs

I need to be able to schedule a job on the 10th of each month and have it run for a set number of days or until a specified date.

Is there any way to customize sql server agent jobs using some sort of API or something?

  • ADO.Net : Get table definition from SQL server tables
  • Best-practices for localizing a SQL Server (2005/2008) database
  • SQL Server 2008 R2 - How to split my varchar column string and get 3rd index string
  • How do I find ' % ' with the LIKE operator in SQL Server?
  • How to know the state of an sql instance in a c# program
  • Can't see created tables in Object Explorer - Microsoft SQL Management Studio
  • Thanks.

    3 Solutions collect form web for “How to customize sql server agent jobs”

    You can accomplish using the SQL Job Schedule properties by using more than one schedule for the job. You can schedule the job to run on the 10th day of the month (with the option for an end date). You can then create multiple schedules, one for the 11th, 12th, etc.

    The SQL Server Agent does not have a schedule option like you need, so I think your workaround is as good as it gets for keeping it inside SQL Server.

    The Windows Task Scheduler however does have an option to run a job on the ‘x’ day of the month, maybe kicking your sproc off using sqlcmd via Windows Task Scheduler is an alternate solution?

    Hope this helps

    I still can’t find any way of customizing the job schedule, but I have figured a way around it by adding the condition to the job step:

    IF (DAY(GetDate()) >= 10)

    And setting the schedule to run every day.

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.