title: Passing input variables to a Windows Scheduled Task
body: <p>I am trying to find a way to be able to pass a couple variables into a Windows Task Scheduler task and I can't find the answer anywhere.  I'm not even sure it is possible.</p>
  
  <p>The purpose of this task will be to run a batch file, which will call dtexec to run a SSIS package against my SQL server.  I need to remote execute the SSIS package and found that this could be done via PsExec on the remote server, calling a scheduled task on the SQL box.  I have gotten this method to work well on other packages.</p>
  
  <p>However, I have a task which requires a StartDate and an EndDate for the package.  I can explicitly put the dates into the Add Arguments portion of the scheduled task and it runs fine.  I need this argument to be dynamic so when some one requests this data, they enter the dates, and it runs using those dates.</p>
  
  <p>I'm expecting I need to put something in the Add arguments field which will allow this to happen, but I can't find the syntax anywhere.  As well, how can I set these variables via command line to set them.</p>
  
  <p>I expect the command to look like 
  C:\PsTools\psexec \SQLBOX schtasks /run /tn SCHEDTASKNAME /tr <em>input variable syntax</em></p>
  
  <p>Any help or a push in the right direction would be greatly appreciated.</p>