title: How do I create a step in my SQL Server Agent Job which will run my SSIS package?
body: <p>I'm trying to create an automated job for the SQL Server Agent to run. The job is supposed to run my SSIS package.</p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>EXEC sp_add_job @job_name = 'My Job'
              ,@description = 'My First SSIS Job'
              ,@job_id = @jobid OUTPUT
  
  EXEC sp_add_jobstep @job_id =@jobid
                      ,@step_name = N'Upload Data'
                      ,@step_id = 1
                      ,@command=N'/FILE "D:\Installs\Upload.dtsx"'
  EXEC sp_add_jobstep @job_id = @jobid
                      ,@step_name = N'Download Data'
                      ,@step_id = 2
                      ,@command=N'/FILE "D:\Installs\Download.dtsx"'
  </code></pre>
  
  <p>Unfortunately when I run this, I get an error saying</p>
  
  <blockquote>
    <p>Incorrect syntax near '/'</p>
  </blockquote>
  
  <p>I suspect it's complaining about the <code>/FILE</code> in my command.</p>
  
  <p>I can't find documentation about the appropriate syntax to use within @command anywhere -- I pulled <code>/FILE</code> out of some old code I found somewhere.  What is the correct syntax for running an SSIS package in a job?</p>