<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: REST API returns empty results when launched from Windows Task Scheduler in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-returns-empty-results-when-launched-from-Windows-Task/m-p/14163#M1404</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I faced the similer issue with Splunk 4.1.6 running on Windows 2003.
I saw some application error events for "splunk.exe" in Windows Application Event logs.&lt;/P&gt;

&lt;P&gt;I finally found that my case was caused by SPL-36206. It has been fixed in Splunk 4.1.7.
&lt;A href="http://www.splunk.com/base/Documentation/latest/ReleaseNotes/4.1.7" rel="nofollow"&gt;Splunk 4.1.7 release notes&lt;/A&gt; says...&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;Splunk Launcher CLI crashes when
  HOMEPATH env variable not set.
  (SPL-36206)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;When my batch file is launched by Task Scheduler, HOMEPATH environment variable is not set, I confirm.&lt;/P&gt;

&lt;P&gt;Could you try to set the "HOMEPATH" environment variable before launching "splunk.exe"?
Or could you upgrade Splunk to 4.1.7?&lt;/P&gt;

&lt;P&gt;My current batch file is ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SET HOMEDRIVE=C:
SET HOMEPATH=\TEMP
"C:\Program files\Splunk\bin\splunk.exe" search "&amp;lt;my search command&amp;gt;" -app search -auth admin:changeme
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I hope this information helps you.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Feb 2011 17:51:17 GMT</pubDate>
    <dc:creator>Suda</dc:creator>
    <dc:date>2011-02-15T17:51:17Z</dc:date>
    <item>
      <title>REST API returns empty results when launched from Windows Task Scheduler</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-returns-empty-results-when-launched-from-Windows-Task/m-p/14162#M1403</link>
      <description>&lt;P&gt;I developed an application that uses REST API to run a search (and then do &lt;EM&gt;other&lt;/EM&gt; things).&lt;/P&gt;

&lt;P&gt;This application is launched by the Windows Task Scheduler.&lt;/P&gt;

&lt;P&gt;On version 4.0.9 and also some releases of version 4.1 this used to work fine.&lt;/P&gt;

&lt;P&gt;Days ago i tried to install latest version and this stopped working.&lt;/P&gt;

&lt;P&gt;Now if I run the application from a CMD window, everything works "as expected".  But when i open the "Scheduled Tasks" window and go "right-click &amp;gt; Run" on the very same application, the query always comes up &lt;STRONG&gt;empty&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;Any ideas?
Thanks In Advance,
Marcelo&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2010 04:46:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-returns-empty-results-when-launched-from-Windows-Task/m-p/14162#M1403</guid>
      <dc:creator>marcelofinki</dc:creator>
      <dc:date>2010-05-25T04:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: REST API returns empty results when launched from Windows Task Scheduler</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-returns-empty-results-when-launched-from-Windows-Task/m-p/14163#M1404</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I faced the similer issue with Splunk 4.1.6 running on Windows 2003.
I saw some application error events for "splunk.exe" in Windows Application Event logs.&lt;/P&gt;

&lt;P&gt;I finally found that my case was caused by SPL-36206. It has been fixed in Splunk 4.1.7.
&lt;A href="http://www.splunk.com/base/Documentation/latest/ReleaseNotes/4.1.7" rel="nofollow"&gt;Splunk 4.1.7 release notes&lt;/A&gt; says...&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;Splunk Launcher CLI crashes when
  HOMEPATH env variable not set.
  (SPL-36206)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;When my batch file is launched by Task Scheduler, HOMEPATH environment variable is not set, I confirm.&lt;/P&gt;

&lt;P&gt;Could you try to set the "HOMEPATH" environment variable before launching "splunk.exe"?
Or could you upgrade Splunk to 4.1.7?&lt;/P&gt;

&lt;P&gt;My current batch file is ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SET HOMEDRIVE=C:
SET HOMEPATH=\TEMP
"C:\Program files\Splunk\bin\splunk.exe" search "&amp;lt;my search command&amp;gt;" -app search -auth admin:changeme
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I hope this information helps you.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2011 17:51:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-returns-empty-results-when-launched-from-Windows-Task/m-p/14163#M1404</guid>
      <dc:creator>Suda</dc:creator>
      <dc:date>2011-02-15T17:51:17Z</dc:date>
    </item>
  </channel>
</rss>

