Thanks in advance

Fluid Byte wrote:Say what?
Information JOB File here: http://filext.com/detaillist.php?extdetail=JOBHenrik wrote:What's a job file ordian. ?
Somehow i get the feeling that you want to list all running processes, something like task manager
if so search for someting like "list processes"
most is old - pb v 3.xx- so ask again with code example if you have trouble running them.
http://msdn2.microsoft.com/en-us/library/aa446802.aspxKaeru Gaman wrote:writing a complex code that is able to create a JOB?
yes, if you know how exactly a JOB is constructed.
Code: Select all
; For more info...
; http://support.microsoft.com/kb/313565
; This adds a task to run Windows Calculator one time only within the next minute
; Allow extra processing time if clock time is about to change to the next minute
; otherwise the task will wait 24 hours
If Second(Date()) > 55
runtime$ = FormatDate("%hh:%ii", AddDate(Date(), #PB_Date_Minute, 2))
Else
runtime$ = FormatDate("%hh:%ii", AddDate(Date(), #PB_Date_Minute, 1))
EndIf
runProg = RunProgram("cmd", "/c at " + runtime$ + " /interactive calc.exe", "", #PB_Program_Hide | #PB_Program_Open)
result = WaitProgram(runProg)
If ProgramExitCode(runProg) <> 0
MessageRequester("Error", "Unable to process command." + #crlf$ + "Check to make sure Task Scheduler is running.", #MB_OK | #MB_ICONERROR)
Else
MessageRequester("Success", "New task has been set to run at " + runtime$, #MB_OK | #MB_ICONINFORMATION)
EndIf
CloseProgram(runProg)
I think there is no way to do without, because there must be an ApplicationSparkie wrote:Also, Task Scheduler must be running for this to work and I don't know of anyway of getting around that.
ok, so read that what you find behind the Links.oridan wrote:http://msdn2.microsoft.com/en-us/library/aa446802.aspxKaeru Gaman wrote:writing a complex code that is able to create a JOB?
yes, if you know how exactly a JOB is constructed.
http://www.tek-tips.com/viewthread.cfm? ... 060&page=6
http://www.codeproject.com/shell/Schedu ... Wizard.asp
http://www.codeproject.com/shell/cscheduledtask.asp
Thanks Sparkie, you found to alternatives good and works perfectly,Sparkie wrote:This does not create a .job file but it does create a new task. I have not had any success using NetScheduleJobAdd_() but I have had success with using AT commands. This code will set a task to start Windows Calculator in ~1 minute from runtime. Also, Task Scheduler must be running for this to work and I don't know of anyway of getting around that. If a user doesn't want Task Scheduler enabled, we should honor and respect that in our code.
Code: Select all
; For more info... ; http://support.microsoft.com/kb/313565 ; This adds a task to run Windows Calculator one time only within the next minute ; Allow extra processing time if clock time is about to change to the next minute ; otherwise the task will wait 24 hours If Second(Date()) > 55 runtime$ = FormatDate("%hh:%ii", AddDate(Date(), #PB_Date_Minute, 2)) Else runtime$ = FormatDate("%hh:%ii", AddDate(Date(), #PB_Date_Minute, 1)) EndIf runProg = RunProgram("cmd", "/c at " + runtime$ + " /interactive calc.exe", "", #PB_Program_Hide | #PB_Program_Open) result = WaitProgram(runProg) If ProgramExitCode(runProg) <> 0 MessageRequester("Error", "Unable to process command." + #crlf$ + "Check to make sure Task Scheduler is running.", #MB_OK | #MB_ICONERROR) Else MessageRequester("Success", "New task has been set to run at " + runtime$, #MB_OK | #MB_ICONINFORMATION) EndIf CloseProgram(runProg)