<html>#887: SimFactory problems when running from cron
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Ian Hinder</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>wontfix</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>SimFactory</td></tr>
</table>

<p>Changes (by Roland Haas):</p>
<p><table>
<tr><td>status:</td><td>wontfix (was new)</td></tr>
</table></p>
<p>When running from a cron job, the user's profile has not been set up in the usual way.  I have to source /etc/profile on Datura to get things like qsub and qstat on the path.  Should simfactory do something about this?</p>
<p><strong>Keyword:</strong></p>
<p>Comment (by Roland Haas):</p>
<p>Running from a cronjob seems unusual enough that doing so (and getting it right) seems like something that only "experts" will want to do. Those are then expected to set up an environment suitable for simfactory. I would rather have simfactory avoid having support for very many exotic uses. If code depend on <code>$PATH</code> then a solution is to put the full path to <code>qsub</code> etc. into the ini file to eliminate any <code>$PATH</code> dependencies. This also avoids picking up the "wrong" executable if users change their <code>$PATH</code> from what we expect it to be.</p>
<p>A similar issue also exists when using "ssh" to connect to a OSX system since in that case <code>PATH</code> differs from what one would normally find.</p>
<p>As far as I can tell <code>sim login</code> does not execute <code>envsetup</code> on the remote side, only on the local side (as part of <code>ExecuteCommand</code>. To my knowledge <code>envsetup</code> is only executed by <code>sim execute</code> (and its internal use by simfactory). <code>sim login</code> tries to mimic what happens by a regular <code>ssh</code> command by executing the shell it starts as a login shell (by passing the <code>-l</code> option), it relies on <code>bash</code> to turn a shell whose stdin is network socket into an interactive shell (ie it does not pass the <code>-i</code> option).</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/887/simfactory-problems-when-running-from-cron'>https://bitbucket.org/einsteintoolkit/tickets/issues/887/simfactory-problems-when-running-from-cron</a></p>
</html>