I have changed $d in $date and remmed out d$:
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 '+$date+' at '+$time
$rc=scheduletask($name, $comp, $date, $time, $type, $cmd)
? 'Error '+@ERROR+' - '+@SERROR
Next