Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does a scheduled Job disables itself?

Status
Not open for further replies.

FaStOnE

Programmer
Jan 4, 2002
14
US
I have a scheduled Job that is set up to run from 8am to 8pm Mon-Fri, with no end date. The job runs a stored procedure and works fine when it runs. Unfortunately, after it completes the daily runs (at 8pm) it disables itself somehow. Thus, not restarting again until I manually force it to an 'enabled' status.

I have checked to make sure the SQL Service Agent is running etc, etc.. but can find no reason as to why it disables the job. I have other jobs that are set to run ONCE a day at 3:00am, and they work and schedule fine without incident.

Any suggestions?

Rick
 
If you feel that you've checked all other possible causes, script the job, put it on this thread so that we can take a peek at it.
Lauryn Bradley
SQL Server DBA
 
Here is the Script of the Stored Procedure. It's pretty much straight forward.
Set NoCount ON

-- Build temp table to hold Inbound Data
Drop Table EDI..TmpInbound
Create Table EDI..TmpInbound
( TmpInData Char(120) Null )

-- Go get whatever is in our Mailbox at MISG
Exec master..xp_cmdshell 'ftp -n -s:D:\EDI\FTP_RECSTB.txt >> D:\EDI\Receive_Logs\FTP_RECSTBLog.txt'

-- Insert whatever is received into the Inbound Log
BULK INSERT EDI..TmpInbound FROM 'D:\EDI\Inbound.txt'

-- Insert a header in the Inbound Log
Insert Into EDI..Inbound
( InData )
Values
( 'FTP - Receive STB/997' )

Insert Into EDI..Inbound
( InData )
Select TmpInData From EDI..TmpInBound

-- Update the EDIMonitor
Exec ProcessInbound

Set NoCount OFF

The "ProcessInbound" just weeds out the info from the Inbound text that I need to process the EDI Order Receipts.

Hope this helps!


Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top