Skip to Content
author's profile photo Former Member
Former Member

Cronjob log result

Hi all, I have written a cronjob to populate some field automatically. Since it could fail, I'd like to log the detailed results. When I say log, I don't mean the consoleLog, but something more graphical that the business could look at.

For example, is it possible to log result in the HMC logText field or in the little frame that pops up when the cronjob is fired?

Thanks for any help.

Cheers!

Gabriele

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2017 at 12:15 PM

    Hi ,

    If you want to find the logs related to some imports just search on console ,when your cronjob got started .Then in console you will see the immediate impex import job ,if you are doing through impex import via cronjob . If you able to find successfully that job ,then go to hmc>cronjobs there you search that job and you will able to access the log tab then download the log and examine it.

    I hope got your question correctly.

    Thanks

    Raushan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 11, 2019 at 10:49 AM

    Addition to what mentioned, what you can do is, you can add the LOGs inside the perform () method of the cron job and place try-catch block. In case of an exception, use LOG.error to print the stack trace or best is you may choose to use localized one liner message. Go to the HMC and before you run the cron job, set the log levels to error and you'll get the one liner error messages in the cron job log file.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.