<?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: how to run .login and .profile file from cron in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090416#M93312</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;your forum profile tells us:&lt;BR /&gt; I have assigned points to   19  of   71  responses to  my questions.&lt;BR /&gt;&lt;BR /&gt;Here is a link, describing how to submit points:&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;</description>
    <pubDate>Tue, 05 Feb 2008 15:08:34 GMT</pubDate>
    <dc:creator>Peter Nikitka</dc:creator>
    <dc:date>2008-02-05T15:08:34Z</dc:date>
    <item>
      <title>how to run .login and .profile file from cron</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090407#M93303</link>
      <description>Hi,&lt;BR /&gt;I want to execute .login file through cron. I want to setup a cron for xyz user. Is following command is correct...&lt;BR /&gt;&lt;BR /&gt;00 2 * * *  ./appl/temp/.login&lt;BR /&gt;&lt;BR /&gt;I can run from user login and execute the following is ok.&lt;BR /&gt;/appl/temp&amp;gt;./.login           &lt;BR /&gt;&lt;BR /&gt;But the following i can not run, getting error.&lt;BR /&gt;/appl/temp&amp;gt;./appl/becca/.login&lt;BR /&gt;./appl/becca/.login: Command not found.&lt;BR /&gt;&lt;BR /&gt;Pls let me know which is the correct command to setup in cron.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;mp</description>
      <pubDate>Wed, 30 Jan 2008 19:02:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090407#M93303</guid>
      <dc:creator>MANISH PATEL_2</dc:creator>
      <dc:date>2008-01-30T19:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to run .login and .profile file from cron</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090408#M93304</link>
      <description>You need a space:&lt;BR /&gt;&lt;BR /&gt;. /appl/becca/.login&lt;BR /&gt;&lt;BR /&gt;That is dot space slash appl slash becca slash dot login&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 30 Jan 2008 19:16:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090408#M93304</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-01-30T19:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to run .login and .profile file from cron</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090409#M93305</link>
      <description>Keep in mind that any environment variables are only as good as the current invocation of the shell.&lt;BR /&gt;&lt;BR /&gt;Not sure what you really are trying to accomplish here.  If it is the typicall "I need the users env for a script that is run" then you need to call the profile from within the script in the same manner and make sure to export all variables.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Jan 2008 19:20:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090409#M93305</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2008-01-30T19:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to run .login and .profile file from cron</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090410#M93306</link>
      <description>&lt;!--!*#--&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;The environment provided by 'cron' to a task is quite sparsely defined.  From the manpages for 'crontask' you will see that the PATH variable consists, by default, of only '/usr/bin' and '/usr/sbin' and your ${HOME} directory.&lt;BR /&gt;&lt;BR /&gt;Any environmental variables you need must also be supplied by sourcing (reading) your login profile (a poor way); by sourcing a file of those variables (a good way); or by coding them in the script you run.&lt;BR /&gt;&lt;BR /&gt;Since the typical login .profile has interactive, terminal-oriented commands like 'stty' and 'tset', processing your standard profile leads to "Not a typewriter" messages.  Either modify your '.profile' to exclude these when it is not interactive:&lt;BR /&gt;&lt;BR /&gt;if [ -t 0 ]; then&lt;BR /&gt;    stty ...&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;...or place your environmental variables in a file that can be sourced by both your .profile and any script that needs it:&lt;BR /&gt;&lt;BR /&gt;. myenv&lt;BR /&gt;&lt;BR /&gt;...Note the dot, followed by whitespace, followd by the filename.  That is called 'sourcing' and causes the file named to be read into the current shell's environment without spawning a new shell.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 30 Jan 2008 19:26:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090410#M93306</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-01-30T19:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to run .login and .profile file from cron</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090411#M93307</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;files with the name '.login' are often used to set environment variables in CSH-like shells.&lt;BR /&gt;These commands won't work well in Bourne-like shells, even when calling the script with the correct syntax.&lt;BR /&gt;The cron configuration will (nearly 100%) start each crontab-entry in a posix-shell environment.&lt;BR /&gt;If you use tcsh - for example - you would have to use a command line like this:&lt;BR /&gt;0 2 * * * tcsh -c 'source xxx/.login; morecommands'&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Thu, 31 Jan 2008 08:09:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090411#M93307</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2008-01-31T08:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to run .login and .profile file from cron</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090412#M93308</link>
      <description>Hi Pete&lt;BR /&gt;&lt;BR /&gt;I tried from user login . /appl/temp/.login but i m getting following error.&lt;BR /&gt;Following PATH setup for user:-PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/appl/temp&lt;BR /&gt;&lt;BR /&gt;/bin/.: Permission denied.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;MP</description>
      <pubDate>Thu, 31 Jan 2008 17:10:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090412#M93308</guid>
      <dc:creator>MANISH PATEL_2</dc:creator>
      <dc:date>2008-01-31T17:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to run .login and .profile file from cron</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090413#M93309</link>
      <description>"Following PATH setup for user:-PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/appl/temp&lt;BR /&gt;&lt;BR /&gt;/bin/.: Permission denied."&lt;BR /&gt;&lt;BR /&gt;A) What shell is the used by the ID you tried?&lt;BR /&gt;-and-&lt;BR /&gt;B) What *exactly* is in the file /appl/temp/.login?&lt;BR /&gt;&lt;BR /&gt;FWIW: /bin should be a link to /usr/bin anyway, so it hasn't any meaning in this context</description>
      <pubDate>Thu, 31 Jan 2008 17:44:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090413#M93309</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2008-01-31T17:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to run .login and .profile file from cron</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090414#M93310</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i am using C shell and from .login it execute perl scripts.&lt;BR /&gt;&lt;BR /&gt;Anyway i incorporate in sh and it execute from shell scripts.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Manish</description>
      <pubDate>Tue, 05 Feb 2008 14:27:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090414#M93310</guid>
      <dc:creator>MANISH PATEL_2</dc:creator>
      <dc:date>2008-02-05T14:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to run .login and .profile file from cron</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090415#M93311</link>
      <description>Hi guys,&lt;BR /&gt;I incorporate the execute scripts in shell.&lt;BR /&gt;It work fine.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;MP</description>
      <pubDate>Tue, 05 Feb 2008 14:30:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090415#M93311</guid>
      <dc:creator>MANISH PATEL_2</dc:creator>
      <dc:date>2008-02-05T14:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to run .login and .profile file from cron</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090416#M93312</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;your forum profile tells us:&lt;BR /&gt; I have assigned points to   19  of   71  responses to  my questions.&lt;BR /&gt;&lt;BR /&gt;Here is a link, describing how to submit points:&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Feb 2008 15:08:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-run-login-and-profile-file-from-cron/m-p/5090416#M93312</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2008-02-05T15:08:34Z</dc:date>
    </item>
  </channel>
</rss>

