Showing posts with label scheduled. Show all posts
Showing posts with label scheduled. Show all posts

Monday, March 19, 2012

How to catchup job schedule? Scheduled jobs not running.

Hi,
I try not to schedule jobs during sw/hw maintenance windows, but sometimes
it happens - even more so now with active windows update running. It just
shuts down without regard to what's running.
Unfortunately, when the sql server comes back up, it doesn't run jobs that
are past due. I can't seem to find any setting that would 'catch-up' the
jobs. Would you share your thoughts on how to deal with this situation.
thanks
Doug
I don't think there is a "built-in" function for this type of situation.
However, you can create your own stored procedure that queries
msdb..sysjobhistory and look for run_status = 0, then use sp_start_job to
start those jobs that failed. And then you can set up a scheduled job to run
this SP during every restart.
"Doug Little" wrote:

> Hi,
> I try not to schedule jobs during sw/hw maintenance windows, but sometimes
> it happens - even more so now with active windows update running. It just
> shuts down without regard to what's running.
> Unfortunately, when the sql server comes back up, it doesn't run jobs that
> are past due. I can't seem to find any setting that would 'catch-up' the
> jobs. Would you share your thoughts on how to deal with this situation.
> thanks
> --
> Doug

How to catchup job schedule? Scheduled jobs not running.

Hi,
I try not to schedule jobs during sw/hw maintenance windows, but sometimes
it happens - even more so now with active windows update running. It just
shuts down without regard to what's running.
Unfortunately, when the sql server comes back up, it doesn't run jobs that
are past due. I can't seem to find any setting that would 'catch-up' the
jobs. Would you share your thoughts on how to deal with this situation.
thanks
DougI don't think there is a "built-in" function for this type of situation.
However, you can create your own stored procedure that queries
msdb..sysjobhistory and look for run_status = 0, then use sp_start_job to
start those jobs that failed. And then you can set up a scheduled job to ru
n
this SP during every restart.
"Doug Little" wrote:

> Hi,
> I try not to schedule jobs during sw/hw maintenance windows, but sometimes
> it happens - even more so now with active windows update running. It just
> shuts down without regard to what's running.
> Unfortunately, when the sql server comes back up, it doesn't run jobs that
> are past due. I can't seem to find any setting that would 'catch-up' the
> jobs. Would you share your thoughts on how to deal with this situation.
> thanks
> --
> Doug

How to catchup job schedule? Scheduled jobs not running.

Hi,
I try not to schedule jobs during sw/hw maintenance windows, but sometimes
it happens - even more so now with active windows update running. It just
shuts down without regard to what's running.
Unfortunately, when the sql server comes back up, it doesn't run jobs that
are past due. I can't seem to find any setting that would 'catch-up' the
jobs. Would you share your thoughts on how to deal with this situation.
thanks
--
DougI don't think there is a "built-in" function for this type of situation.
However, you can create your own stored procedure that queries
msdb..sysjobhistory and look for run_status = 0, then use sp_start_job to
start those jobs that failed. And then you can set up a scheduled job to run
this SP during every restart.
"Doug Little" wrote:
> Hi,
> I try not to schedule jobs during sw/hw maintenance windows, but sometimes
> it happens - even more so now with active windows update running. It just
> shuts down without regard to what's running.
> Unfortunately, when the sql server comes back up, it doesn't run jobs that
> are past due. I can't seem to find any setting that would 'catch-up' the
> jobs. Would you share your thoughts on how to deal with this situation.
> thanks
> --
> Doug

Friday, March 9, 2012

How to call a stored procedure in a scheduled job

Hi All,

I have a stored procedure.

I need to create a scheduled job using that stored procedure.

I went to Enterprise Manager -->Management--> Jobs-->New Job
Properties

In the step tab, I can select db and put the codes.
Instead of writing the code there, I want to call the stored procedure
in the command box.

How can I do that?

System: MS SQL Server 2000

I would highly appreciate your help.

Thanks a million in advance.

Best regards,

mamunIn the Type Dropdown, select T-SQL & call your stored procedure like:

EXEC usp...

--
- Anith
( Please reply to newsgroups only )

Friday, February 24, 2012

How to calculate a value which takes the prev rows value for calculation.

Hi All,

Please help me with this problem
I have two fields in my report- Production hours and Scheduled Start Time.

For the first record in the report the scheduled start time field will have the current date time field value ,but for consecutive records it is the sum of Prod-hrs+scheduled start time (of the Previous record).

I tried the following formula

if OnFirstRecord then
{@.CurrDateTime}
else
Previous({@.Schd_Start_Time})+{dpRptCSReport.prod_hrs}

but get the error ' A formula cannot refer to itself, either directly or indirectly'
Can you please suggest a way out??

Thanks in advance
RashmiHi All,

Please help me with this problem
I have two fields in my report- Production hours and Scheduled Start Time.

For the first record in the report the scheduled start time field will have the current date time field value ,but for consecutive records it is the sum of Prod-hrs+scheduled start time (of the Previous record).

I tried the following formula

if OnFirstRecord then
{@.CurrDateTime}
else
Previous({@.Schd_Start_Time})+{dpRptCSReport.prod_hrs}

but get the error ' A formula cannot refer to itself, either directly or indirectly'
Can you please suggest a way out??

Thanks in advance
Rashmi

Please can anyone suggest a solution? Please can you help Madhi?|||If OnFirstRecord = true Then ({@.CurrDateTime}; Global NumberVar Test :=
{@.Schd_Start_Time})+{dpRptCSReport.prod_hrs})
Else Previous({Test});
Global NumberVar Test :=
{@.Schd_Start_Time})+{dpRptCSReport.prod_hrs});|||this formula will help you
change currentdatetime with ur need.

global datetimevar z;
if OnFirstRecord then
(
currentdatetime;
z:=currentdatetime;
)
else
(
z+10;
z:=z+10
)