Search code examples
sqlsql-serverssmsjobsschedule

Run SQL package with different parameters at different times of the day


I am trying to run an SQL package from our SQL Server via a scheduled job at different times of the day with different parameters. The package imports property specific information (our company has multiple properties) that is available after a certain time of the day. The package accepts a property code parameter to identify the property information to be imported.

If possible, I would like to re-use one package/job and set up multiple steps that execute at certain times of the day.

Is there a better way to set this up besides using multiple jobs that run the same package with its own parameters?

I would really appreciate some advice, thank you.


Solution

  • Multiple steps allow you to stop execution if a step fails so the thing you do in step 10, will NOT run if step 9 fails.

    If you care about that requirement, use a single job with multiple steps. If you don’t, use multiple jobs.

    If you need to control the time of each step, then you must use multiple jobs.

    Really, the answer is based on what you need to accomplish.