can robo taaask do...

Discuss RoboTask here
Post Reply
mosler
Posts: 5
Joined: Tue Oct 24, 2006 2:33 pm

can robo taaask do...

Post by mosler »

Check disk space for multiple machinesGenerate disk usage reportsCan be scheduledCan be triggered when usage hits a certain thresholdCan email reports
Oleg
Site Admin
Posts: 3201
Joined: Thu Jan 01, 1970 1:00 am
Contact:

can robo taaask do...

Post by Oleg »

Check disk space for multiple machines
Generate disk usage reports
Yes. Maybe we need to add such system variables. But now you can do this with basic script.
See basic script below.

Code: Select all

Public Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTotalNumberOfClusters As Long) As Long

Sub Main
Dim sec As Long
Dim bps As Long
Dim fc As Long
Dim tc As Long
Dim res As Double

GetDiskFreeSpace("c:\", sec, bps, fc, tc)

res = CDbl(sec)*CDbl(bps)*CDbl(fc)
MsgBox("Free bytes " + CStr(res) +" bytes")

res = CDbl(sec)*CDbl(bps)*CDbl(tc)
MsgBox("Total bytes " + CStr(res) +" bytes")

res = (fc/tc)*100
MsgBox("Disk load " + CStr(res) +" %")

End Sub
Use UNC names for network disks: \\computer2\share\
Can be scheduled
Yes. You may attach to task scheduler triggering event.
Can be triggered when usage hits a certain threshold
Attach the cyclic event to the task.
Algorithm of the task will be such:

calculate DiskLoad
if DiskLoad > limit then
   create text of report
   mail report
end if
Can email reports
Yes. See "Send email" action
Post Reply