Page 1 of 2 12>
Topic Options
#44136 - 2003-08-18 04:57 AM Scheduled Tasks
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
When scheduling a task using jt.exe, does anyone know how to force a task to repeat every "x" hours for a month or a year or however long you choose? I can't find the proper options within jt.exe
Top
#44137 - 2003-08-18 08:29 AM Re: Scheduled Tasks
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Did you get a chance to look at -

http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=000060

This has been detailed out pretty well..

http://www.jsiinc.com/SUBF/TIP2600/rh2621.htm

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#44138 - 2003-08-19 12:05 AM Re: Scheduled Tasks
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
Kent, I have looked at Sealeopard's UDF and it works quite well. I still have not been able to figure out how to make the task recur multiple times in one day. There is a MinutesInterval trigger, but when that value is set, it sets the task to recur in days and not minutes.

Maybe I'm just missing something.

Top
#44139 - 2003-08-19 12:18 AM Re: Scheduled Tasks
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
scheluding task more than once a day?
as far as I know, you will have 2 choises:
1) make own task for each time you wish it to be ran
2) use kixtart's sleep. first instance risen by task-scheluder and rest are from kixtart with the interval you want.
_________________________
!

download KiXnet

Top
#44140 - 2003-08-18 04:02 PM Re: Scheduled Tasks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
As far as I know, JT cannot schedule tasks that contain triggers for multiple events per day. You will either have to create multiple triggers for the same task by using Glenn's tsControl UDF collection or have the task re-scheudle itself in appropriate intervals.
_________________________
There are two types of vessels, submarines and targets.

Top
#44141 - 2003-08-18 04:35 PM Re: Scheduled Tasks
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
The TaskScheduler COM interface may be able to accomplish this need.

In particular the "Interval" property seems to be the number of minutes between executions.

quote:
c:\data\scripts>%tmp%\kix32 taskscheduler.kix

Task Scheduler Jobs for \\amdc006
===============================================
JobName: DumpObjectsADSI.job
ApplicationName: c:\csaapps\dumpobj-adsi.cmd
Parameters:
AccountName: TYCO\account
MostRecentRunTime: 8/18/2003 6:00:00 AM
NextRunTime: 8/19/2003 6:00:00 AM
Status: 1
ExitCode: 1
Creator: account

Trigger Proprties
--------------------
BeginTime: 4/10/2003 6:00:00 AM
Days:
DaysInterval: 1
DaysOftheWeek:
Duration: 0
EndTime:
Flags: 0
Interval: 0
Months:
triggerString: At 6:00 AM every day, starting 4/10/2003
TriggerType: 1
WeeksInterval:
WhichWeek:
--------------------
JobName: SetPrfDc.job
ApplicationName: c:\jobs\setdc11.cmd
Parameters:
AccountName: TYCO\account1
MostRecentRunTime: 8/18/2003 10:30:00 AM
NextRunTime: 8/18/2003 11:30:00 AM
Status: 1
ExitCode: 1
Creator: account1

Trigger Proprties
--------------------
BeginTime: 10/2/2002 12:30:00 AM
Days:
DaysInterval: 1
DaysOftheWeek:
Duration: 1380
EndTime:
Flags: 2
Interval: 60
Months:
triggerString: Every 1 hour(s) from 12:30 AM for 23 hour(s) every day, starting 10/2/2002
TriggerType: 1
WeeksInterval:
WhichWeek:
--------------------


break on
$MyTasks = CreateObject("Scheduler.SchedulingAgent.1")


$Server = "\\server"
$MyTasks.TargetComputer = $Server

? "Task Scheduler Jobs for " + $Server
? "==============================================="
For Each $objTask in $MyTasks.Tasks
? "JobName: " + $objTask.JobName
? "ApplicationName: " + $objTask.ApplicationName
? "Parameters: " + $objTask.Parameters
? "AccountName: " + $objTask.AccountName
? "MostRecentRunTime: " + $objTask.MostRecentRunTime
? "NextRunTime: " + $objTask.NextRunTime
? "Status: " + $objTask.Status
? "ExitCode: " + $objTask.ExitCode
? "Creator: " + $objTask.Creator
?
? "Trigger Proprties"
? "--------------------"
for each $trigger in $objTask.Triggers
$BeginTime = $trigger.BeginTime
$Days = $trigger.Days
$DaysInterval = $trigger.DaysInterval
$DaysOftheWeek = $trigger.DaysOftheWeek
$Duration = $trigger.Duration
$EndTime = $trigger.EndTime
$Flags = $trigger.Flags
$Interval = $trigger.Interval
$Months = $trigger.Months
$triggerString = $trigger.triggerString
$TriggerType = $trigger.TriggerType
$WeeksInterval = $trigger.WeeksInterval
$WhichWeek = $trigger.WhichWeek

? "BeginTime: " + $BeginTime
? "Days: " + $Days
? "DaysInterval: " + $DaysInterval
? "DaysOftheWeek: " + $DaysOftheWeek
? "Duration: " + $Duration
? "EndTime: " + $EndTime
? "Flags: " + $Flags
? "Interval: " + $Interval
? "Months: " + $Months
? "triggerString: " +$triggerString
? "TriggerType: " + $TriggerType
? "WeeksInterval: " + $WeeksInterval
? "WhichWeek: " + $WhichWeek
next
? "--------------------"
Next


[ 18. August 2003, 16:53: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#44142 - 2003-08-18 04:54 PM Re: Scheduled Tasks
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You need to get and register the TaskScheduler.DLL.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#44143 - 2003-08-18 05:18 PM Re: Scheduled Tasks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The TaskScheduler DLL is part of Microsoft Site Server and not available as a stand-alone component.
_________________________
There are two types of vessels, submarines and targets.

Top
#44144 - 2003-08-18 05:25 PM Re: Scheduled Tasks
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Yes but one can install the Demo...and grab the DLL

[ 18. August 2003, 17:26: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#44145 - 2003-08-18 07:02 PM Re: Scheduled Tasks
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
When I attempt to schedule a task on a remote machine I receive the following error:

[FAIL ] ITaskScheduler::AddWorkItemn hr=0x80070050

The scheduler is running on the target machine and I have admin rights on the target. I receive the same error on any remote machine.

Any ideas?

Top
#44146 - 2003-08-18 07:04 PM Re: Scheduled Tasks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
It's hard to help you if you don't even tell us how you schedule the task, e.g. which UDF is being used, or whether you're using your own script.
_________________________
There are two types of vessels, submarines and targets.

Top
#44147 - 2003-08-18 07:11 PM Re: Scheduled Tasks
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
Sorry Jens, I'm using your UDF "SCHEDULETASK" to schedule the task. It works fine when I run it locally, but when I specify a remote machine name I get the error.
Top
#44148 - 2003-08-18 07:27 PM Re: Scheduled Tasks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Are you using the latest version of ScheduleTask() ?
_________________________
There are two types of vessels, submarines and targets.

Top
#44149 - 2003-08-18 07:41 PM Re: Scheduled Tasks
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
I have actually been using version 1.2. I just went and got your version 1.3 and am going to try that. Could v1.2 have been causing the problem?
Top
#44150 - 2003-08-18 07:56 PM Re: Scheduled Tasks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Yes, there were some problems which do not seem to happen after I switched the parameter order.
_________________________
There are two types of vessels, submarines and targets.

Top
#44151 - 2003-08-18 08:26 PM Re: Scheduled Tasks
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
I switched to version 1.3 and it works on some machines and returns the following errors on others:

[FAIL ] ITaskScheduler::AddWorkItemn hr=0x80070035

I have seen 0x80070035 in error messages before that referred to "machine name not found", but the machine name definately exists. Has anyone else ran into this before?

Top
#44152 - 2003-08-18 08:33 PM Re: Scheduled Tasks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Actually, I think the correct errro message is "network path was not found".

Check whether you can remotely access the "\\computername\scheduled tasks" folder and make sure you're using an account that has the proper privileges (minimum of local admin on the remote machine).
_________________________
There are two types of vessels, submarines and targets.

Top
#44153 - 2003-08-18 09:13 PM Re: Scheduled Tasks
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
You are correct about "network path not found". As for connecting to the scheduled tasks folder, I am a bit confused. I can type \\remotemachinename from the run line on my PC and I can see all of the shares on the remote machine. I can open the scheduled tasks folder, but am unable to create a new task. (Obviously my problem).

What confuses me is that I have admin rights on the remote PC. I'm thinking it might be something that has been set in the local security policy (Win2k machines) but I'm just not sure what setting it might be - if that's even the case.

Top
#44154 - 2003-08-18 09:19 PM Re: Scheduled Tasks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Connect to it via e.g. the explorer Window and use the UNC as provided, there is a 'Scheduled Tasks' folder, though it is not listed.

You also need to be careful with authentication as you cannot authenticate against a remote computer with a different username if you are already authenticated.
_________________________
There are two types of vessels, submarines and targets.

Top
#44155 - 2003-08-18 09:51 PM Re: Scheduled Tasks
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
The problem was the remote registry service had been disabled. I can now schedule the task, but if I schedule it to run under the security context of a different user, the task runs but it is invisible to the currently logged on user.

Is there a way to change that or is that the nature of the beast?

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.07 seconds in which 0.023 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org