# Failure when using Add Scheduled Task action

**URL:** https://www.finalbuilder.com/forums/t/failure-when-using-add-scheduled-task-action/1427
**Category:** Discussion
**Created:** [January 20, 2010, 1:13am UTC](https://www.finalbuilder.com/forums/t/failure-when-using-add-scheduled-task-action/1427 "2010-01-20T01:13:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jed624](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@jed624](https://www.finalbuilder.com/forums/u/jed624)
#### Post date: [January 20, 2010, 1:13am UTC](https://www.finalbuilder.com/forums/t/failure-when-using-add-scheduled-task-action/1427/1 "2010-01-20T01:13:28Z")

</div>

We have a script running the Add Scheduled Task action to restart itself 2 minutes after it finishes.&nbsp; The stars aligned last night&nbsp;and we bumped into an issue when the script exited within 2 minutes of midnight and attempted to create a scheduled task that was slated for the next day.&nbsp; Here's the log (our company info replaced by items in brackets):

Parameters: /Create /TN "[script name]" /RU [user] /RP&nbsp;[password] /SC ONCE /TR "\"C:\Program Files\FinalBuilder 6\\FinalBuilder6.exe\" /r /n /e [file path]" /ST 00:01:15 /SD 1/20/2010  
Output from C:\WINDOWS\system32\schtasks.exe  
ERROR: Invalid Start Date (Date should be in "mm/dd/yyyy" format).  
Type "SCHTASKS /CREATE /?" for usage. Action Failed  
C:\WINDOWS\system32\schtasks.exe returned : 1

It looks like there may be a bug when FinalBuilder needs to provide an /SD for the next day to satisfy the task.&nbsp; The format for the month doesn't appear to be a two digit month, which schtasks.exe seems to expect.&nbsp;&nbsp;Normally for us the /SD parameter&nbsp;isn't provided during this action, because in most&nbsp;reschedules, they are slated to start on the same day.

We're currently running 6.3.0.1472, but just from a surface perusal, it looked like there had been no changes in this action.&nbsp; We could always call schtasks.exe with our own calculated parameters, but it's such a convenient action, that if there is a bug here,&nbsp;it would be handy if the action could perhaps be updated.

Thanks&nbsp;  
  
&nbsp;

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [January 20, 2010, 9:39am UTC](https://www.finalbuilder.com/forums/t/failure-when-using-add-scheduled-task-action/1427/2 "2010-01-20T09:39:44Z")

</div>

Hi Jason,   
  
 Thanks for reporting this, we’ll have a new build available soon.   
  
 Regards,   
 Paul.
