cancel
Showing results for 
Search instead for 
Did you mean: 

Batch job being executed on server

Former Member
0 Kudos

Hello,

I noticed there is a Windows batch program to delete and recreate a folder on daily basis running on the server.

I believe this script is required as I back up my data to disk and it will delete the previous backup before it starts a new backup

I know it is running because I can see the folder being created everyday at certain time.

However, when I check under Control Panel - Scheduled Task, I do not see the batch job there.

I have an external backup program but according to the person in charge, it is not calling this script.

How can I find out who trigger this batch program to run?

Accepted Solutions (1)

Accepted Solutions (1)

former_member189546
Active Contributor
0 Kudos

Hello,

Check SM69 for os commands being run.

See note 677435 Overview: external programs and external commands

regards,

John Feely

Former Member
0 Kudos

Thanks John.

I found the script was scheduled in SM69 as an external command.

I am trying to find out what date/time the script will execute but not able to get this information

I can only see the created/changed by as well as the parameters for OS command when I click on the display icon for the script.

I cannot find any information from Note 677435 and 188772 either.

How do I determine when the script was last executed?

Former Member
0 Kudos

Most likely it is called via a step in an background job.

To find the background job, logon to SAP and

run tcode SM37.

Enter asterisk (star) as "Job name" and "User name".

Clear out the dates under "Job start condition".

Press the button "Extended job selection"

Mark the tab strip "Steps"

Select your external command and the Execute.

Former Member
0 Kudos

Tomas, you are spot on. Thanks!

Another question, this is what i saw in the job log:

Date Time Message text

05.07.2010 19:00:58 Job started

05.07.2010 19:00:59 Step 001 started

05.07.2010 19:00:59 External command: ZBACK_DEL

05.07.2010 19:00:59 Related parameter:

05.07.2010 19:01:09 Ext. prog.:

05.07.2010 19:01:09 Ext. prog.: T:\usr\sap\P80\DVEBMGS00\work>rmdir X:\oracle\P80\backup1\

05.07.2010 19:01:09 Ext. prog.:

05.07.2010 19:01:09 Ext. prog.: T:\usr\sap\P80\DVEBMGS00\work>rmdir X:\oracle\P80\backup2\

05.07.2010 19:01:09 Ext. prog.:

05.07.2010 19:01:09 Ext. prog.: T:\usr\sap\P80\DVEBMGS00\work>mkdir X:\oracle\P80\backup1

05.07.2010 19:01:09 Ext. prog.:

05.07.2010 19:01:09 Ext. prog.: T:\usr\sap\P80\DVEBMGS00\work>mkdir X:\oracle\P80\backup2

05.07.2010 19:01:09 Ext. prog.:

05.07.2010 19:01:09 Ext. prog.: T:\usr\sap\P80\DVEBMGS00\work>exit

05.07.2010 19:01:09 Ext. prog.: SAPXPG started on b5myP80_P80_00, Process ID 9928, Process Number 19

05.07.2010 19:01:09 Step 002 started (program RSDBAJOB, variant &0000000000003, user ID USER_BACKUP)

05.07.2010 19:01:09 Execute logical command BRBACKUP On host b5myP80

....

05.07.2010 20:07:36 BR0051I BRBACKUP 7.00 (39)

05.07.2010 20:07:36 BR0055I Start of database backup: bedpjlgv.fnd 2010-07-05 19.01.09

So the command ZBACK_DEL was ran before the backup, is there a way to know if the external command was executed successfully, for eg with a message like return code 0?

Former Member
0 Kudos
So the command ZBACK_DEL was ran before the backup, 
is there a way to know if the external command was executed successfully, 
for eg with a message like return code 0?

This depends on the command itself.

E g If it's a script, then it's depends on the one who wrote the script.

Answers (1)

Answers (1)

former_member204746
Active Contributor
0 Kudos

a few possibilities:

1. check using OS tool "AT"

2. a 3rd party scheduler (such as Tivoli)

3. an ABAP program is triggering the OS script.