<?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: Cron is not working... in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018512#M47994</link>
    <description>I needed to use...if [[ $NUM_PROC == 1 ]] &lt;BR /&gt;while I was using ...if [[ $NUM_PROC = 1 ]] &lt;BR /&gt;in my script..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks everybody :-)</description>
    <pubDate>Thu, 21 Dec 2006 01:28:48 GMT</pubDate>
    <dc:creator>praveen..</dc:creator>
    <dc:date>2006-12-21T01:28:48Z</dc:date>
    <item>
      <title>Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018495#M47977</link>
      <description>Hi,&lt;BR /&gt;I am able to execute 1 script using #./tmp/script.sh&lt;BR /&gt;&lt;BR /&gt;and can get the desired output on my email.&lt;BR /&gt;&lt;BR /&gt;I want to run this script in every 15 minutes so i made some entries in crontab file&lt;BR /&gt;&lt;BR /&gt;# crontab -e&lt;BR /&gt;00,15,30,45 * * * * /tmp/script.sh&lt;BR /&gt;&lt;BR /&gt;But now i am not getting any mail&lt;BR /&gt;# ps -ef | grep -i cron&lt;BR /&gt;root      3348     1  0 Nov30 ?        00:00:00 crond&lt;BR /&gt;root     31075 23905  0 02:34 pts/7    00:00:00 grep -i cron&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;Please suggest&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Dec 2006 03:34:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018495#M47977</guid>
      <dc:creator>praveen..</dc:creator>
      <dc:date>2006-12-13T03:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018496#M47978</link>
      <description>Now I tried with...&lt;BR /&gt;&lt;BR /&gt;* * * * * date &amp;gt; /tmp/cron.test&lt;BR /&gt;&lt;BR /&gt;in crontab file &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and it is working fine...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please suggest</description>
      <pubDate>Wed, 13 Dec 2006 03:50:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018496#M47978</guid>
      <dc:creator>praveen..</dc:creator>
      <dc:date>2006-12-13T03:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018497#M47979</link>
      <description>1. add &lt;BR /&gt;MAILTO=&lt;BR /&gt;to explicitly assign the mail user;&lt;BR /&gt;&lt;BR /&gt;2.&lt;BR /&gt;check /var/log/crontab to see your cronjobs had been invoked&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Dec 2006 09:14:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018497#M47979</guid>
      <dc:creator>George Liu_4</dc:creator>
      <dc:date>2006-12-13T09:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018498#M47980</link>
      <description>correct on my last post.&lt;BR /&gt;it should be &lt;BR /&gt;/var/log/cron &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Dec 2006 09:15:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018498#M47980</guid>
      <dc:creator>George Liu_4</dc:creator>
      <dc:date>2006-12-13T09:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018499#M47981</link>
      <description>Does '/tmp/script.sh' rely upon a given PATH being set?&lt;BR /&gt;&lt;BR /&gt;Generally, only a bare-minimum of PATH is set in the cron environment.&lt;BR /&gt;&lt;BR /&gt;Basically, you've got two choices:&lt;BR /&gt;&lt;BR /&gt;1) Make sure the path you require is set within the script.&lt;BR /&gt;&lt;BR /&gt;2) Absolutely-path every command you call.</description>
      <pubDate>Wed, 13 Dec 2006 18:17:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018499#M47981</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-12-13T18:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018500#M47982</link>
      <description>#tail -10 /var/log/cron&lt;BR /&gt;Dec 15 02:50:01 hostname crond[11336]: (root) CMD (/opt/wlserver/ldm1v4.sh)&lt;BR /&gt;&lt;BR /&gt;I am getting this message on every minutes.&lt;BR /&gt;&lt;BR /&gt;/opt/wlserver/ldm1v4.sh is the script which i am trying to execute using cron.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;where i need to add "MAILTO"?&lt;BR /&gt;&lt;BR /&gt;I think path is set because if i give this command..&lt;BR /&gt;#/opt/wlserver/ldm1v4.sh&lt;BR /&gt;&lt;BR /&gt;then script is successfully executing.&lt;BR /&gt;&lt;BR /&gt;please suggest&lt;BR /&gt;thanks&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Dec 2006 04:05:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018500#M47982</guid>
      <dc:creator>praveen..</dc:creator>
      <dc:date>2006-12-15T04:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018501#M47983</link>
      <description>If you're getting that message every minute, then you're executing that script every minute.&lt;BR /&gt;&lt;BR /&gt;As this isn't "/tmp/script.sh", I don't see how that's relevant.&lt;BR /&gt;&lt;BR /&gt;Now, back to the PATH issue.  Executing a command from the command line *IS NOT THE SAME* as having it execute from cron.&lt;BR /&gt;&lt;BR /&gt;The PATH environment variable is different.  STDIN, STDOUT and STDERR are different when executed from cron.  Lots of things are different when executed from cron.</description>
      <pubDate>Sat, 16 Dec 2006 02:53:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018501#M47983</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-12-16T02:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018502#M47984</link>
      <description>hello!&lt;BR /&gt;&lt;BR /&gt;i think the syntax is incorrect.&lt;BR /&gt;Try first with a classical command, without comma, example:&lt;BR /&gt;10 4 1 * * /tmp/script.sh&lt;BR /&gt;&lt;BR /&gt;Then, check if you have cron.allow file.&lt;BR /&gt;&lt;BR /&gt;Bye</description>
      <pubDate>Sat, 16 Dec 2006 12:19:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018502#M47984</guid>
      <dc:creator>Alpha977</dc:creator>
      <dc:date>2006-12-16T12:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018503#M47985</link>
      <description>Praveen,&lt;BR /&gt;&lt;BR /&gt;Alpha is correct. &lt;BR /&gt;&lt;BR /&gt;The syntax that you have used in the crontab file is incorrect.&lt;BR /&gt;&lt;BR /&gt;The format which Alpha has also mentioned will be ---&lt;BR /&gt;&lt;BR /&gt;15 * * * * &lt;ABSOLUTE path="" to="" the="" script="" file=""&gt;&lt;BR /&gt;Then restart your crond service and then see if it gets executed or not.....&lt;BR /&gt;&lt;BR /&gt;Also you can check your cron jobs using crontab -l command&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Atul&lt;/ABSOLUTE&gt;</description>
      <pubDate>Mon, 18 Dec 2006 09:19:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018503#M47985</guid>
      <dc:creator>Atul Gautam</dc:creator>
      <dc:date>2006-12-18T09:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018504#M47986</link>
      <description>Alpha, Atul, you're both wrong.&lt;BR /&gt;&lt;BR /&gt;There's nothing wrong with a comma-delimited set of minute values.  Go back and re-read your man pages.&lt;BR /&gt;&lt;BR /&gt;Also, if using 'crontab -e', the '/etc/crontab' file or '/etc/cron.d/' structure, there's no need to restart 'crond'.</description>
      <pubDate>Mon, 18 Dec 2006 17:02:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018504#M47986</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-12-18T17:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018505#M47987</link>
      <description>so please let me know how to ser PATH environment variable &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 19 Dec 2006 01:51:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018505#M47987</guid>
      <dc:creator>praveen..</dc:creator>
      <dc:date>2006-12-19T01:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018506#M47988</link>
      <description>2nd line of your script:&lt;BR /&gt;&lt;BR /&gt;PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin"&lt;BR /&gt;&lt;BR /&gt;that sort of thing.&lt;BR /&gt;&lt;BR /&gt;Do 'echo $PATH' in the shell to get what it's currently set to.. copy/paste that in.</description>
      <pubDate>Tue, 19 Dec 2006 04:20:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018506#M47988</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-12-19T04:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018507#M47989</link>
      <description>I have set the PATH in my script,&lt;BR /&gt;but still that script is not running using cron.&lt;BR /&gt;&lt;BR /&gt;if i execute this script using #./script.sh&lt;BR /&gt;, I am getting the correct output.&lt;BR /&gt;&lt;BR /&gt;when i am using cron....even I am not getting any thing in /var/log/maillog&lt;BR /&gt;&lt;BR /&gt;(This script send me the output to my email id)&lt;BR /&gt;&lt;BR /&gt;Please suggest</description>
      <pubDate>Tue, 19 Dec 2006 05:34:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018507#M47989</guid>
      <dc:creator>praveen..</dc:creator>
      <dc:date>2006-12-19T05:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018508#M47990</link>
      <description>What's the first line of the script file?</description>
      <pubDate>Tue, 19 Dec 2006 06:42:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018508#M47990</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-12-19T06:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018509#M47991</link>
      <description>This script is for to find a process "ldm1v4" whether it is running or not?&lt;BR /&gt;&lt;BR /&gt;if the process is not running, script will send the email. (mailfile is a script to send the emails)&lt;BR /&gt;&lt;BR /&gt;# cat ldm1v4.sh&lt;BR /&gt;&lt;BR /&gt;PATH="/home/db2home/SymphonyRPM/Server/Python23:/home/db2home/SymphonyRPM/Share:/home/db2home/SymphonyRPM/Server/ldap:/home/db2home/SymphonyRPM/Server/stubs::/home/db2home/SymphonyRPM/server:/home/db2home/SymphonyRPM/server/Python23:/home/db2home/SymphonyRPM/share:/home/db2home/SymphonyRPM/server/ldap:/home/db2home/SymphonyRPM/Server/stubs::/usr/local/nz/bin:/opt/CA/SharedComponents/dmscript/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin"&lt;BR /&gt;NUM_PROC=$(ps -ef |grep -c ldm1v4)&lt;BR /&gt;if [[ $NUM_PROC = 1 ]]&lt;BR /&gt;then&lt;BR /&gt;/opt/wlserver/mailfile_ldm1v4.sh praveen@hp.com root@hostname.company.com 1 2 `hostname`::wlserver process is  running&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and I also tried with #!/bin/sh&lt;BR /&gt;&lt;BR /&gt;# cat ldm1v4.sh&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;PATH="/home/db2home/SymphonyRPM/Server/Python23:/home/db2home/SymphonyRPM/Share:/home/db2home/SymphonyRPM/Server/ldap:/home/db2home/SymphonyRPM/Server/stubs::/home/db2home/SymphonyRPM/server:/home/db2home/SymphonyRPM/server/Python23:/home/db2home/SymphonyRPM/share:/home/db2home/SymphonyRPM/server/ldap:/home/db2home/SymphonyRPM/Server/stubs::/usr/local/nz/bin:/opt/CA/SharedComponents/dmscript/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin"&lt;BR /&gt;NUM_PROC=$(ps -ef |grep -c ldm1v4)&lt;BR /&gt;if [[ $NUM_PROC = 1 ]]&lt;BR /&gt;then&lt;BR /&gt;/opt/wlserver/mailfile_ldm1v4.sh praveen@hp.com root@hostname.company.com 1 2 `hostname`::wlserver process is  running&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If i give the command...&lt;BR /&gt;#./ldm1v4.sh&lt;BR /&gt;&lt;BR /&gt;I got the desired result&lt;BR /&gt;this script is not working with cron&lt;BR /&gt;&lt;BR /&gt;Please suggest</description>
      <pubDate>Tue, 19 Dec 2006 06:57:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018509#M47991</guid>
      <dc:creator>praveen..</dc:creator>
      <dc:date>2006-12-19T06:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018510#M47992</link>
      <description>That should be working.&lt;BR /&gt;&lt;BR /&gt;Check the messages file for any cron errors, restart crond, ensure that 'crontab -l' shows the right stuff, that the file is actually there and is executeable (+x), that the security policy allows for it to execute outside of a shell (audit.log possibly)...&lt;BR /&gt;&lt;BR /&gt;Time to grasp at straws.</description>
      <pubDate>Tue, 19 Dec 2006 07:26:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018510#M47992</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-12-19T07:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018511#M47993</link>
      <description>At this time, I hope your cronjob works fine.&lt;BR /&gt;BUt If it is not, follow the steps below:&lt;BR /&gt;&lt;BR /&gt;1. in file /var/log/cron, check your script/cronjob has been started&lt;BR /&gt;&lt;BR /&gt;2. If not, check your crontab syntax&lt;BR /&gt;&lt;BR /&gt;3. If yes, append  "&amp;gt;&amp;gt;&amp;amp; /tmp/cron.log" on the problematic entry of your crontab, and add some debug info in your script&lt;BR /&gt;&lt;BR /&gt;What's your shell? is it bash or csh? The path  setting is different. &lt;BR /&gt;</description>
      <pubDate>Tue, 19 Dec 2006 09:23:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018511#M47993</guid>
      <dc:creator>George Liu_4</dc:creator>
      <dc:date>2006-12-19T09:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cron is not working...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018512#M47994</link>
      <description>I needed to use...if [[ $NUM_PROC == 1 ]] &lt;BR /&gt;while I was using ...if [[ $NUM_PROC = 1 ]] &lt;BR /&gt;in my script..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks everybody :-)</description>
      <pubDate>Thu, 21 Dec 2006 01:28:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-is-not-working/m-p/5018512#M47994</guid>
      <dc:creator>praveen..</dc:creator>
      <dc:date>2006-12-21T01:28:48Z</dc:date>
    </item>
  </channel>
</rss>

