|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
task scheduler- eduardo schedulerscheduler with all the functionality to create a windows task. http://www.mvps.org/emorcillo/en/code/vb6/index.shtml My question is how can I set the "Stop task if it runs for x number of hours"? By default the value is set to 72hrs. I would like to set this value to 1 hr. Below is the code to create a task that runs everday hourly. ------------VBSCRIPT BELOW TO CREATE JOB USING EDUARO'S SCHEDULER -------------- set m_oSchedule = CreateObject("TaskScheduler2.Schedule") set oTask = m_oSchedule.CreateTask("MenJob") m_oSchedule.Refresh With oTask oTask.ApplicationName = "c:\test.vbs" ' Set other properties .Creator = "SS" ' Set default FlagsText .Flags = 0 ' Add a m_oSchedule with .Triggers With .Add .BeginDay = DATE .StartTime = 0 ' not TIME - you want to run every hour from 00:00 .Duration = 1440 ' run for 24 hours = 1 day .Interval = 60 ' every 60 minutes = 1 hour end with end With .SetAccountInfo "testuser", "testpassword" ' Save the task oTask.Save end With 'Clean up m_oSchedule=null oTask =null "Big D" <BigDaddy@newsgroup.nospam> wrote in message Big D,news:uVzdZtCTGHA.5808@TK2MSFTNGP12.phx.gbl... > I have been using a task scheduler from below site. So far it's been a great > scheduler with all the functionality to create a windows task. > > http://www.mvps.org/emorcillo/en/code/vb6/index.shtml > > My question is how can I set the "Stop task if it runs for x number of > hours"? By default the value is set to 72hrs. I would like to set this value > to 1 hr. > the task object has a "maxruntime" property it defaults like this in milli-seconds. Defaults to 72 hours : 259200000 ms 1 hour= 3600000 ( 5 zeros) bye, tlviewer
Are there alternatives to using WIN32_Find_Data?
SendMessage vs. PostMessage Best ways for reading and editing text files OT: Blew away shortcut to desktop, How to replace it?? Windows 2000 Professional search for a file using vba Timer to start my program at a certain time? How to implement Link List in VB 6.0? Run-time error 523 Question about Strings to Numbers VB Newbie |
|||||||||||||||||||||||