Shane, Jens,

At work it works great. I didn't changed the UDF's since I posted the full script. Next step is to update the ScheduleTask() UDF.

Code:
 
For Each $comp In $computers

; filter
;------------------------------
;$os = osid($comp)
;
;If $os[1]='Win2K' AND $os[2]<>'Workstation' AND InStr($comp,"comp")<>0


; Date /Time
;------------------------------
$time=serialtime(serialtime($time)+serialtime($timediff))
$day=Val(Split($time,':')[0])
$hour=Split($time,':')[1]
$minute=Split($time,':')[2]
$time=$hour+':'+$minute
If $time='24:00'
$time='00:00'
$date=DateMath($date, 1)
EndIf
If $day>0
$date=DateMath($date, $day)
EndIf

; Date Format
;------------
$d = Split($date,'/')[1] + '/' + Split($date,'/')[2] + '/' + Split($date,'/')[0]


; Schedule Task
;------------------------------
?''
? 'Task will be scheduled on '+$comp+' on '+$d+' at '+$time
$rc=scheduletask($name, $comp, $d, $time, $type, $cmd)
? 'Error '+@ERROR+' - '+@SERROR

Next



There was a small problem at 24:00
Quote:


Task will be scheduled on comp1 on 01/05/2004 at 24:00
Error 1 - Incorrect function.

Task will be scheduled on comp2 on 01/06/2004 at 00:30
Error 0 - The operation completed successfully.





I modified the script with this peace of code:
Code:

If $time='24:00'
$time='00:00'
$date=DateMath($date, 1)
EndIf



Problem solved:
Quote:


Task will be scheduled on comp1 on 01/06/2004 at 00:00
Error 0 - The operation completed successfully.

Task will be scheduled on comp2 on 01/06/2004 at 00:30
Error 0 - The operation completed successfully.






Thanks guy's!
_________________________
Co