cancel
Showing results for 
Search instead for 
Did you mean: 

Schedule a Job

Former Member
0 Kudos

Hi,

I have followed the following <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1515">blog</a> and inside the run method I have written a code which accesses user data and calls a Remote FM using JCA.

The same code works when I execute in Abstract portal component.

I have scheduled the job but the FM I wanted to call is not getting triggered at all.

Can some one give me some idea of where should I look to solve this problem.

Regards,

Nagaraju Donikena

Message was edited by:

Nagaraju Donikena

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member1
Active Participant
0 Kudos

You have to provide the key for the schedular as well... which is not mentioned in the blog. The key is provided in the application in the java file. In java file you can find the text /insert key here/ please replace this with the any value.

Thanks,

Anish

Former Member
0 Kudos

Hi

Did you select any system ID in <b>CM Systems</b> property while scheduling the job?

If not, trty with this option.

Regards,

Yoga

Former Member
0 Kudos

Hi Lakshmi,

I did select the CM System.

I am not sure if the task is getting triggered or not.

Can I know the ways to ensure that task is getting triggered.

Means checking log, writing some comments in log etc.

I am not sure about the way to know if a task is getting executed.

Currently I am trying to check that through the Function module I am calling.

Regards,

Nagaraju Donikena

former_member189326
Active Participant
0 Kudos

You will want to have a look at the <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/d2/5c830ca67fd842b2e87b0c341c64cd/frameset.htm">Logging and Tracing API</a>.

To get started, you'll want to have a static variable in your scheduler task:


static Location _loc = Location.getLocation(<classname>.class);

and then you can make calls in individual methods like this:


_loc.debugT("It's running!");

In order for this method to work, you'll have to make sure that the location for the class in question is set to output for the "Debug" level.

So if your Java class is "com.acme.example.MyClass", then you'll want to create a new location in Visual Administrator's Log Configurator with the same name (or any "parent" of this name, like "com.acme") and then make sure the severity is set to "Debug" to see the messages.

Also, there used to be an issue with scheduler tasks where it was necessary to browse down through the entire configuration tree in the KM config iView and click on your task to get the KM runtime to load the task. This was in older versions.

Do you see any errors in your logs?