Showing posts with label whenever. Show all posts
Showing posts with label whenever. Show all posts

Friday, March 23, 2012

job run when idle

I'm trying to get a SQL Agent scheduled job working using the Schedule
Type of 'Start whenever the CPUs become idle', but it doesn't seem to
be working.
I setup a maintenance task to check db integrity (as a test), set it
to run today in about 2 minutes, changed the Schedule type to 'Start
on idle' and the 'Define idle CPU condition' and watched CPU
utilization and the monitor to see if it runs, but it never does.
What step am I missing?
Thanks!
Chris
I don't use this feature, and don't know anybody who uses this feature
(though that doesn't mean nobody uses it). The reason is that for a SQL
Server job, it's better to know when it'll run than it is to leave it to
'random' chances.
Linchi
"cbtechlists@.gmail.com" wrote:

> I'm trying to get a SQL Agent scheduled job working using the Schedule
> Type of 'Start whenever the CPUs become idle', but it doesn't seem to
> be working.
> I setup a maintenance task to check db integrity (as a test), set it
> to run today in about 2 minutes, changed the Schedule type to 'Start
> on idle' and the 'Define idle CPU condition' and watched CPU
> utilization and the monitor to see if it runs, but it never does.
> What step am I missing?
> Thanks!
> Chris
>
|||I'm with Linchi, CPU utilization jobs generally shouldn't be used. I
would use the performance counters on the machine to keeps a log for
an average day/week of work and design a date/time strategy around
that. It should give you the best times to run these types of things,
i.e. low cpu + low I/O + low users @. 4:00 am everyday. Also take into
account any data loads or batch executions of programs or ones that
users manually do.
On Mar 20, 9:44Xam, Linchi Shea <LinchiS...@.discussions.microsoft.com>
wrote:
> I don't use this feature, and don't know anybody who uses this feature
> (though that doesn't mean nobody uses it). The reason is that for a SQL
> Server job, it's better to know when it'll run than it is to leave it to
> 'random' chances.
> Linchi
>
> "cbtechli...@.gmail.com" wrote:
>
>
> - Show quoted text -

job run when idle

I'm trying to get a SQL Agent scheduled job working using the Schedule
Type of 'Start whenever the CPUs become idle', but it doesn't seem to
be working.
I setup a maintenance task to check db integrity (as a test), set it
to run today in about 2 minutes, changed the Schedule type to 'Start
on idle' and the 'Define idle CPU condition' and watched CPU
utilization and the monitor to see if it runs, but it never does.
What step am I missing?
Thanks!
ChrisI don't use this feature, and don't know anybody who uses this feature
(though that doesn't mean nobody uses it). The reason is that for a SQL
Server job, it's better to know when it'll run than it is to leave it to
'random' chances.
Linchi
"cbtechlists@.gmail.com" wrote:
> I'm trying to get a SQL Agent scheduled job working using the Schedule
> Type of 'Start whenever the CPUs become idle', but it doesn't seem to
> be working.
> I setup a maintenance task to check db integrity (as a test), set it
> to run today in about 2 minutes, changed the Schedule type to 'Start
> on idle' and the 'Define idle CPU condition' and watched CPU
> utilization and the monitor to see if it runs, but it never does.
> What step am I missing?
> Thanks!
> Chris
>|||I'm with Linchi, CPU utilization jobs generally shouldn't be used. I
would use the performance counters on the machine to keeps a log for
an average day/week of work and design a date/time strategy around
that. It should give you the best times to run these types of things,
i.e. low cpu + low I/O + low users @. 4:00 am everyday. Also take into
account any data loads or batch executions of programs or ones that
users manually do.
On Mar 20, 9:44=A0am, Linchi Shea <LinchiS...@.discussions.microsoft.com>
wrote:
> I don't use this feature, and don't know anybody who uses this feature
> (though that doesn't mean nobody uses it). The reason is that for a SQL
> Server job, it's better to know when it'll run than it is to leave it to
> 'random' chances.
> Linchi
>
> "cbtechli...@.gmail.com" wrote:
> > I'm trying to get a SQL Agent scheduled job working using the Schedule
> > Type of 'Start whenever the CPUs become idle', but it doesn't seem to
> > be working.
> > I setup a maintenance task to check db integrity (as a test), set it
> > to run today in about 2 minutes, changed the Schedule type to 'Start
> > on idle' and the 'Define idle CPU condition' and watched CPU
> > utilization and the monitor to see if it runs, but it never does.
> > What step am I missing?
> > Thanks!
> > Chris- Hide quoted text -
> - Show quoted text -sql

Wednesday, March 21, 2012

Job NextRunDate using DMO always 0

Hi All,
I'm having a problem where whenever I add a new job (in code) with a
schedule to our server, the NextRunDate and NextRunTime properties are
always 0.
I have tried executing the sp_help_jobschedule stored procedure, but the
values returned are still 0.
I noticed that when i did a refresh on the job object itself when i was
using SQL Server 2000 SP4, the nextRunDate and time were calculated
correctly, however, we are not moving to SP4 and are staying on SP3a, so
that doesn't really help me.
Hope you can help.
Thanks,
BenHi
Just wondering if sp_help_job gives you the correct schedule?
John
"Ben Brearley" wrote:

> Hi All,
> I'm having a problem where whenever I add a new job (in code) with a
> schedule to our server, the NextRunDate and NextRunTime properties are
> always 0.
> I have tried executing the sp_help_jobschedule stored procedure, but the
> values returned are still 0.
> I noticed that when i did a refresh on the job object itself when i was
> using SQL Server 2000 SP4, the nextRunDate and time were calculated
> correctly, however, we are not moving to SP4 and are staying on SP3a, so
> that doesn't really help me.
> Hope you can help.
> Thanks,
> Ben
>
>|||Hi John,
Yes sp_help_job does give me the correct schedule.
I found out that the problem was fixed in SP4, and it involves Jobs not
starting unless they are owned by an admin user.
I tested this with a domain admin account, and the Next run dates and times
appear perfectly.
So until we go to the latest service pack, i guess this problem will be
unresolved, unless we calculate these Dates and times ourselves.
Ben
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:83BE8BBE-FC78-41B0-8B4C-CBF419ADF44C@.microsoft.com...
> Hi
> Just wondering if sp_help_job gives you the correct schedule?
> John
> "Ben Brearley" wrote:
>|||Hi Beni
If sp_help_job shows the correct shedule use profiler to see what it calls
before it runs sp_help_jobschedule or run sp_help_job and discard the result
before running sp_help_jobschedule.
John
"Ben Brearley" wrote:

> Hi John,
> Yes sp_help_job does give me the correct schedule.
> I found out that the problem was fixed in SP4, and it involves Jobs not
> starting unless they are owned by an admin user.
> I tested this with a domain admin account, and the Next run dates and time
s
> appear perfectly.
> So until we go to the latest service pack, i guess this problem will be
> unresolved, unless we calculate these Dates and times ourselves.
> Ben
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:83BE8BBE-FC78-41B0-8B4C-CBF419ADF44C@.microsoft.com...
>
>