It's been a while since I've had to deal with this - but if memory serves me correctly - the SetTimeout() method actually takes an argument in the form of +SSSS... - i.e. a relative number of *seconds* from "now"You may want to experiment and try something like "+3600" (1 hour) to see if that works to adjust the timeout on the task.
SetTimeout should work fine and I know it at least takes +HHHHMM, not +SSSSSS. I use it all the time.
if ($new_date =~ m|(\d\d\d\d)-(\d\d)-(\d\d)\s(\d\d)\d\d)|) { ($year, $mon, $mday, $hours, $min) = ($1, $2, $3, $4, $5); } $timeout = "$mon$mday$year$hours$min"; ## timeout passed to SetTimeout must be in format of +HHHHMM or MMDDYYYYHHMM if ($timeout ne "") { ($return_succ, $timeout_task) = ($wf->GetTaskByName($timeoutTaskName)); if( $return_succ == 1) { if ($timeout_task->IsValid()) { $return_succ = $timeout_task->SetTimeout($timeout); if( $return_succ == 0) { $error_msg = "Couldn't Set Timeout, Contact Administrator. $timeout"; } else { $task->CallBack(0, "Timeout time set to $new_date ($timeout)"); } } else { $error_msg = "Task Invalid, Contact Administrator."; } }
Yes, it does. Here's a snippet from a cgitask we've used on a few projects: if ($new_date =~ m|(\d\d\d\d)-(\d\d)-(\d\d)\s(\d\d)\d\d)|) { ($year, $mon, $mday, $hours, $min) = ($1, $2, $3, $4, $5); } $timeout = "$mon$mday$year$hours$min"; ## timeout passed to SetTimeout must be in format of +HHHHMM or MMDDYYYYHHMM if ($timeout ne "") { ($return_succ, $timeout_task) = ($wf->GetTaskByName($timeoutTaskName)); if( $return_succ == 1) { if ($timeout_task->IsValid()) { $return_succ = $timeout_task->SetTimeout($timeout); if( $return_succ == 0) { $error_msg = "Couldn't Set Timeout, Contact Administrator. $timeout"; } else { $task->CallBack(0, "Timeout time set to $new_date ($timeout)"); } } else { $error_msg = "Task Invalid, Contact Administrator."; } }