#NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Icon256-32.ico #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Change2CUI=y #AutoIt3Wrapper_Res_Description=Zabbix Monitor scheduled Tasks #AutoIt3Wrapper_Res_Fileversion=1.0.0.49 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_LegalCopyright=2015 Bernhard Linz #AutoIt3Wrapper_Res_SaveSource=y #AutoIt3Wrapper_Res_Language=1031 #AutoIt3Wrapper_Res_Field=Website|http://znil.net #AutoIt3Wrapper_Res_Field=Manual|http://znil.net/index.php?title=Zabbix:TaskSchedulerMonitoring #AutoIt3Wrapper_Res_Field=See You|znil.net #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt('MustDeclareVars', 1) #Region ;************ Includes ************ #Include #include #include #EndRegion ;************ Includes ************ ; ########################################################################################################################## ; ########################################################################################################################## ; # TaskSchedulerMonitoring.exe --> Tool for Check BackupJobs in Zabbix # ; # 2013 Bernhard Linz / Bernhard@znil.de / http://znil.net # ; # # ; # Latest Version of this Program and Template in German: # ; # http://znil.net/index.php?title=Zabbix:TaskSchedulerMonitoring # ; # # ; # ________ .__ __. __ __ .__ __. _______ .___________. # ; # | / | \ | | | | | | | \ | | | ____|| | # ; # `---/ / | \| | | | | | | \| | | |__ `---| |----` # ; # / / | . ` | | | | | | . ` | | __| | | # ; # / /----.| |\ | | | | `----.__| |\ | | |____ | | # ; # /________||__| \__| |__| |_______(__)__| \__| |_______| |__| # ; # # ; ########################################################################################################################## ; ########################################################################################################################## Global $s_schtasksexe Global $s_temp1, $s_temp2 Global $a_temp1, $a_temp2 Global $a_DateTemp Global $a_RuntimeTemp Global $a_ScheduledTasks[1][8] ; [0][0] = Anzahl der Tasks ; [x][1] = Name des Task "original" ; [x][2] = Name des Tasks "bereinigt" - ohne Leerzeichen/Sonderzeichen zur Anzeige in Zabbix unr zur Übergabe an dieses Programm hier ; [x][3] = Last Result ; [x][4] = Last Run Time ; [x][5] = Next Run Time ; [x][6] = Run As User ; [x][7] = Task To Run Global $s_Task2IgnoreFile = @ScriptDir & "\TaskSchedulerMonitoring-ignore.txt" Global $h_Task2IgnoreFile Global $a_Task2Ignore[1] = [ 0 ] Global $b_IgnoreTask = False Global $s_CleanTaskName Global $s_OriginalTaskName Global $s_QueryTaskName Global $i_ThisTask Global $s_JSONOutput Global $s_RunCommand Global $iStartTime Global $iRunTime Global $b_Verbose ; 10 20 30 40 50 60 70 80 ; 12345678901234567890123456789012345678901234567890123456789012345678901234567890 Dim $s__Header = _ "+------------------------------------------------------------------------------" & @CRLF & _ "| TaskSchedulderMonitoring.exe - Version " & FileGetVersion(@ScriptName) & @CRLF & _ "+------------------------------------------------------------------------------" & @CRLF & _ "| 2015 von Bernhard Linz für http://znil.net - Kontakt: Bernhard@znil.net" & @CRLF & _ "+------------------------------------------------------------------------------" & @CRLF & _ @CRLF ; 10 20 30 40 50 60 70 80 ; 12345678901234567890123456789012345678901234567890123456789012345678901234567890 Dim $s__HilfeText = _ "Hilfsprogramm für Zabbix als UserParameter um die Aufgabenplanung / Geplante" & @CRLF & _ "Tasks zu überwachen" & @CRLF & _ "---------------------------------------------------------------------------" & @CRLF & _ @CRLF & _ "Aufruf: " & @CRLF & _ @CRLF & _ @ScriptName & "