11 Replies Latest reply: Mar 12, 2012 3:50 PM by phil3 RSS

Scheduled Reports Fail Intermittently

afiore

I am running the LEM Console and Reports (v5.3) on a Windows 7 system.  I have six reports scheduled to run weekly on Monday morning at 9am.  The reports were set-up in early December and are configured to save the output as a PDF on a network share.  The tasks' configuration in Windows Task Scheduler shows each one set to 'run whether the user is logged in or not' with 'highest privileges'. The tasks run using a service account that is an administrator on the system, with a password that does not change, and that is stored within the task.

For the most part, they run without issue.  However, this Monday the reports did not run - this is probably the third time this has happened since they were set-up a few months back.  The 'report scheduler task' within LEM Reports shows:

  • Status: The task is ready to run
  • Last Run Time: Last Monday (instead of this Monday)
  • Next Run Time: Next Monday
  • Info: At 9:00am every Monday of every week

No changes have been made to the schedules.  There are no errors in the 'History' of the actual Windows Task Scheduler tasks and nothing in the Event Logs on the server.  In the past, the reports just started working again the following week, so I never spent any more time investigating.  However, at this point it's becoming a regular-enough occurrence that I need to figure out what the problem is.

Has anyone seen similar behavior or have an idea what might be causing it?  Thanks for the help.

 
  • Re: Scheduled Reports Fail Intermittently
    phil3

    Hi, there.

    It sounds like this is eventually going to be a Support call, but before you open a ticket, please turn on logging in your scheduled task, and wait for the task to fail one more time. When it fails, open a ticket and be prepared to supply the latest version of the log file.

    To turn on logging in your scheduled task:

     

    1. Open Task Scheduler.
    2. Select the task that's failing, and then click Action > Properties.
    3. Click the Actions tab.
    4. Click Edit.
    5. Add /l before the argument in the Add arguments (optional) field.
      For example: /l "%ProgramFiles%\SchedINI\BATCHDay.ini"
    6. Click OK to close both Properties windows.
    7. After the task fails, grab the log file from %ProgramFiles%\SolarWinds Log and Event Manager Reports. It's called SWLEMReports.log.

     

    Let me know if you have any questions about setting this up.

    Thanks.

    • Re: Scheduled Reports Fail Intermittently
      afiore

      Will do. Thanks for the info.

    • Re: Scheduled Reports Fail Intermittently
      Apollo

      Thanks for the suggestion...however the /I argument prevents the schedule from running in my case. In addition the scheduler shows "running" in the status but the job never finished. 

       

      I've been troubleshooting this for some time without much luck as yet.

       

      ~Steve

      • Re: Scheduled Reports Fail Intermittently
        phil3

        Are you using /I, or /l? The correct option is to use a lower-case "L."

        HTH

      • Re: Scheduled Reports Fail Intermittently
        afiore

        Steve,

        Funny you should say that.  About 4 months ago I was having an unrelated issue with scheduling tasks and support asked me to add the "/l" switch.  When I did, it made my tasks disappear from the Windows Task Scheduler.  While we were trying to figure why the switch was causing problems, I figured out the answer to my original problem and thus the "/l" switch issue was never resolved.  I'd completely forgotten about it until I read your reply...

        In any case, I've gone ahead and tried adding it back in to one of my existing tasks; we'll see what happens.

        Phil, 

        Any suggestions?

        • Re: Scheduled Reports Fail Intermittently
          phil3

          You'll also want to be sure you have quotation marks around your argument, but not the /l.

          Incidentally, if you want to test your task without waiting for it to fail on schedule, you can right-click on it in Task Scheduler and then select Run.

          HTH

          • Re: Scheduled Reports Fail Intermittently
            afiore

            Yeah, that's how I was adding it - outside the quotes.

            So all my reports ran this morning without issue, except for the one that I'd added the /l switch to; it disappeared at some point after adding the switch just like it had in the past.  However, I think that I may have figured out the issue with that.  Whenever I attempted to save the task after adding the /l, I'd get the following prompt:

            In the past, I'd been selecting Yes.  This morning I added the /l to another task, but selected No instead.  I re-ran the task and it seemed to work - and I got a log file. 

            • Re: Scheduled Reports Fail Intermittently
              afiore

              I spoke too soon.  The task that I added the switch to this morning that ran successfully and created the log file has now disappeared.

            • Re: Scheduled Reports Fail Intermittently
              phil3

              I haven't see that particular error, but I have a couple of things you could try:

              1. Make sure the program argument and additional argument are in their respective boxes, as setting these up in Windows 7 is different than doing so in Windows XP, for example. Here's what it should look like:

              1. Program Argument (use quotes): "C:\Program Files (x86)\SolarWinds Log and Event Manager Reports\SWLEMReports.exe"
              2. Additional Argument (use quotes): /l "%ProgramFiles%\SchedINI\BATCHDay.ini"

              The process for setting up scheduled reports using Windows 7 is outlined in Configuring Default Batch Reports on Vista/7/2008 Computers on the SolarWinds Knowledgebase.

              2. Try using the environment variable instead of C:\Program Files (x86) in the additional argument. I've illustrated this in both the screenshot above and the KB article. The appropriate variable is %ProgramFiles(x86)%, though it works without the "(x86)" as well. This is a long-shot, but since the error you're seeing seems like it could be related to the spaces in C:\Program Files (x86), I thought I'd mention it.

              Let us know how it works out.

              Thanks.

              • Re: Scheduled Reports Fail Intermittently
                afiore

                Phil,

                Thanks for the suggestion. Unfortunately, it didn't solve the issue.  I set it up as you said and was able to save the task and run it.  It completes successfully, however no report is generated.  The task remains in the Task Scheduler until I go back to SolarWinds and try and and look at the schedule of the report - it's missing, and then when I go back to Task Scheduler, it's gone.  (It's worth noting that, once modified, the task seems to get deleted as soon as I return to SolarWinds - for example, even if I haven't tried to run it yet.)

                Here is how I configured/modified the task:

                Task as it appears in SolarWinds:

                Run: "C:\Program Files (x86)\SolarWinds Log and Event Manager Reports\SWLEMReports.exe" "C:\Program Files (x86)\SolarWinds Log and Event Manager Reports\SchedINI\RPT20062501-15.ini"
                Start in: "C:\Program Files (x86)\SolarWinds Log and Event Manager Reports\"


                Task as it appears in Task Scheduler before modifying:

                Program/script: C:\Program Files (x86)\SolarWinds Log and Event Manager Reports\SWLEMReports.exe
                Add arguments: "C:\Program Files (x86)\SolarWinds Log and Event Manager Reports\SchedINI\RPT20062501-15.ini"
                Start in: C:\Program Files (x86)\SolarWinds Log and Event Manager Reports\


                Task as it appears in Task Scheduler after modifying:

                Program/script: C:\Program Files (x86)\SolarWinds Log and Event Manager Reports\SWLEMReports.exe
                Add arguments: /l "%ProgramFiles%\SolarWinds Log and Event Manager Reports\SchedINI\RPT20062501-15.ini"
                Start in: C:\Program Files (x86)\SolarWinds Log and Event Manager Reports\


                When I make the change is the Task Scheduler, I get prompted with the following message, to which I answer "No" (if I answer yes, it removes most of the 'Program/script' field).

                 

                Thanks, Adam

                • Re: Scheduled Reports Fail Intermittently
                  phil3

                  Hi, Adam.

                  It looks like this one's going to end up being a Support call. Once you have a ticket open, will you please post your ticket number here so I can keep an eye on it and update the appropriate articles with any notes or corrections?

                  Thanks.