CRON
Is there an easy way to make cron not send me an email every time it runs one of my jobs? I have one job that runs every 15 mins, and as you may imagine that generates a lot of mail. Or is there a way clean up an mbox without manually doing it? -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Cron
I am trying to execute a cron job to backup db2.. my db2 user is db2inst1 i setup the crontab job as db2inst1 when i run it i get an error Output from command /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm .. SQL10007N Message "-1390" could not be retrieved. Reason code: "1". If I run the backup job logged in as db2inst1 no problem if i run the job logged in as root i get the same above error so what i am asking is how do i setup a cron job to execute as user db2inst1?? thanks Ralph
Re: CRON
> -Original Message- > From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On > Behalf Of Mark Pace > Sent: Thursday, August 05, 2010 11:34 AM > To: LINUX-390@VM.MARIST.EDU > Subject: CRON > > Is there an easy way to make cron not send me an email every > time it runs > one of my jobs? I have one job that runs every 15 mins, and > as you may > imagine that generates a lot of mail. Or is there a way > clean up an mbox > without manually doing it? > > -- > Mark D Pace It's been a while, but I think it only sends email if there is any stdout or stderr. So redirect them to /dev/null echo 'command line >/dev/null 2>&1' | at now+5 minutes is how I do it for at. I think you can do the same for cron. -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-961-6183 cell john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: CRON
00 06 * * 0 /usr/local/scripts/security > /dev/null 2>&1 The '> /dev/null' sends the output to the bit bucket. McKown, John wrote: -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Mark Pace Sent: Thursday, August 05, 2010 11:34 AM To: LINUX-390@VM.MARIST.EDU Subject: CRON Is there an easy way to make cron not send me an email every time it runs one of my jobs? I have one job that runs every 15 mins, and as you may imagine that generates a lot of mail. Or is there a way clean up an mbox without manually doing it? -- Mark D Pace It's been a while, but I think it only sends email if there is any stdout or stderr. So redirect them to /dev/null echo 'command line >/dev/null 2>&1' | at now+5 minutes is how I do it for at. I think you can do the same for cron. -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-961-6183 cell john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: CRON
If I have errors I send it to a file. Looking at the email I get from this particular job I don't see any reason to log it. 00,15,30,45 * * * * /home/marpace/bin/scanftp.rxx 2> /home/marpace/scanftp.err So sending the output to null would be 00,15,30,45 * * * * /home/marpace/bin/scanftp.rxx > /dev/null 2> /home/marpace/scanftp.err That look correct? On Thu, Aug 5, 2010 at 12:51 PM, Edmund R. MacKenty < ed.macke...@rocketsoftware.com> wrote: > On Thursday 05 August 2010 12:34, Mark Pace wrote: > >Is there an easy way to make cron not send me an email every time it runs > >one of my jobs? I have one job that runs every 15 mins, and as you may > >imagine that generates a lot of mail. Or is there a way clean up an mbox > >without manually doing it? > > Cron will send an email if the cron job generates output (on either of the > standard output or error streams). So the only reason you're getting > emails > is because whatever program cron is running generates output. > > You can either re-direct the output to the null device, thus throwing it > away, > or log it. I recommend logging it. One simple way to do that is with the > logger(1) program, which sends data to syslogd so you're injecting it into > your usual logging mechanism. As an example: > >*/15 * * * * myscript 2>&1 | logger -t myjob > > That runs "myscript" every 15 minutes, combines its standard error and > output > and sends it to syslog tagged with "myjob" using the "user" facility at > the "notice" level. Use logger's -p option to select a different facility > or > level if you need to. You can then search the logs for "myjob" to find > output from this cron job. > > If you know that "myscript" isn't going to generate any interesting output, > but just want to log any errors, do this: > >*/15 * * * * myscript 2>&1 >/dev/null | logger -t myjob > > That pipes the error stream into logger, but re-directs the output stream > to > the null device. > > Hope this helps! >- MacK. > - > Edmund R. MacKenty > Software Architect > Rocket Software > 275 Grove Street · Newton, MA 02466-2272 · USA > Tel: +1.617.614.4321 > Email: m...@rs.com > Web: www.rocketsoftware.com > > -- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or > visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > -- > For more information on Linux on System z, visit > http://wiki.linuxvm.org/ > -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: CRON
On Thursday 05 August 2010 13:02, Mark Pace wrote: >If I have errors I send it to a file. Looking at the email I get from this >particular job I don't see any reason to log it. >00,15,30,45 * * * * /home/marpace/bin/scanftp.rxx 2> >/home/marpace/scanftp.err > >So sending the output to null would be >00,15,30,45 * * * * /home/marpace/bin/scanftp.rxx > /dev/null 2> >/home/marpace/scanftp.err >That look correct? Yup. That will do the trick. - MacK. - Edmund R. MacKenty Software Architect Rocket Software 275 Grove Street · Newton, MA 02466-2272 · USA Tel: +1.617.614.4321 Email: m...@rs.com Web: www.rocketsoftware.com -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: CRON
On Thursday 05 August 2010 12:34, Mark Pace wrote: >Is there an easy way to make cron not send me an email every time it runs >one of my jobs? I have one job that runs every 15 mins, and as you may >imagine that generates a lot of mail. Or is there a way clean up an mbox >without manually doing it? Cron will send an email if the cron job generates output (on either of the standard output or error streams). So the only reason you're getting emails is because whatever program cron is running generates output. You can either re-direct the output to the null device, thus throwing it away, or log it. I recommend logging it. One simple way to do that is with the logger(1) program, which sends data to syslogd so you're injecting it into your usual logging mechanism. As an example: */15 * * * * myscript 2>&1 | logger -t myjob That runs "myscript" every 15 minutes, combines its standard error and output and sends it to syslog tagged with "myjob" using the "user" facility at the "notice" level. Use logger's -p option to select a different facility or level if you need to. You can then search the logs for "myjob" to find output from this cron job. If you know that "myscript" isn't going to generate any interesting output, but just want to log any errors, do this: */15 * * * * myscript 2>&1 >/dev/null | logger -t myjob That pipes the error stream into logger, but re-directs the output stream to the null device. Hope this helps! - MacK. - Edmund R. MacKenty Software Architect Rocket Software 275 Grove Street · Newton, MA 02466-2272 · USA Tel: +1.617.614.4321 Email: m...@rs.com Web: www.rocketsoftware.com -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: CRON
If running SLES, have you looked at /etc/sysconfig/cron Mark Pace wrote: Is there an easy way to make cron not send me an email every time it runs one of my jobs? I have one job that runs every 15 mins, and as you may imagine that generates a lot of mail. Or is there a way clean up an mbox without manually doing it? -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: CRON
Mark Pace wrote: Is there an easy way to make cron not send me an email every time it runs one of my jobs? I have one job that runs every 15 mins, and as you may imagine that generates a lot of mail. Or is there a way clean up an mbox without manually doing it? man 5 crontab The version of cron I have can be persuaded to not send email A good alternative, in my view, is to write a filter with one's email client to file these emails into a folder which one generally ignores. It's there if needed. -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/ -- Cheers John -- spambait 1...@coco.merseine.nu z1...@coco.merseine.nu -- Advice http://webfoot.com/advice/email.top.php http://www.catb.org/~esr/faqs/smart-questions.html http://support.microsoft.com/kb/555375 You cannot reply off-list:-) -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: CRON
John Summerfield wrote: Mark Pace wrote: Is there an easy way to make cron not send me an email every time it runs one of my jobs? I have one job that runs every 15 mins, and as you may imagine that generates a lot of mail. Or is there a way clean up an mbox without manually doing it? man 5 crontab The version of cron I have can be persuaded to not send email A good alternative, in my view, is to write a filter with one's email client to file these emails into a folder which one generally ignores. It's there if needed. I might also mention that I read a lot (just about all) of system-generated email with alpine (Aternatively-Licenced pine) which lets me deal with the emails much faster than thunderbird and other GUIs can handle it. Dealing with those emails takes less than a second, mostly the email fits on one page. And, I read on a Linux virtual console. -- Cheers John -- spambait 1...@coco.merseine.nu z1...@coco.merseine.nu -- Advice http://webfoot.com/advice/email.top.php http://www.catb.org/~esr/faqs/smart-questions.html http://support.microsoft.com/kb/555375 You cannot reply off-list:-) -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: CRON
Hi Mark, maybe i am a bit late, but you could also try setting SEND_MAIL_ON_NO_ERROR="no" in /etc/sysconfig/cron (SLES) or add a line in the cron file like MAILTO="" 15 * * * * root somescript Regards, Tobias Dörkes. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
cron oddity?
I've written a rexx program to run under cron to do clean up on a directory. It runs fine when I run it myself, but it fails under cron. Trace output from the cron run job shows "sudo ls -lGgh /srv/ftp/pub" "-r--r--r-- 1 14M Nov 7 16:02 GE_Mainline_Ansys ver2.ppt" HUH? when I do it manually the output is "sudo ls -lGgh /srv/ftp/pub" "-r--r--r-- 1 14M 2006-11-07 16:02 GE_Mainline_Ansys ver2.ppt" If I manually do an ls command I get the format with the date as yyyy-mm-dd.Why would the ls command under cron get a date format of Month Day? Very confused Mark D Pace Senior Systems Engineer Mainline Information Systems 1700 Summit Lake Drive Tallahassee, FL. 32317 Office: 850.219.5184 Fax: 888.221.9862 http://www.mainline.com This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Cron question
I feel as tho I am somewhat cron-tarded. I just don't seem to get it.. Granted this might be because the desktop system I'm using to build the el-cheapo monitor widget is running Slackware version 8. but that said On this system, the cron tabs are in /var/spool/cron/crontabs. I created one for the user ID I am using to do the information gathering, which looks like this 1-59/3 * * * * cd /home/statmon ; status.sh 1> /dev/null 2> /dev/null and if I read this right, I needed to fire off crontab -u {userid} to make it work... but it doesn't. The documentation I have is for SuSE, so the whole cron.weekly, cron.daily doesn't seem to be there either. If anyone can beat a clue through this extra thick cranium, I would be delighted. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Cron
Have cron execute the following command, or similar: su - db2inst1 /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm Robert P. Nixinternet: [EMAIL PROTECTED] Mayo Clinic phone: 507-284-0844 RO-CE-8-857page: 507-270-1182 200 First St. SW Rochester, MN 55905 "Codito, Ergo Sum" "In theory, theory and practice are the same, but in practice, theory and practice are different." > -Original Message- > From: Noll, Ralph [SMTP:[EMAIL PROTECTED] > Sent: Friday, January 09, 2004 3:03 PM > To: [EMAIL PROTECTED] > Subject: Cron > > I am trying to execute a cron job to backup db2.. > > my db2 user is db2inst1 > > i setup the crontab job as db2inst1 > > when i run it i get an error > > Output from command /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm .. > > SQL10007N Message "-1390" could not be retrieved. Reason code: "1". > > If I run the backup job logged in as db2inst1 no problem > > if i run the job logged in as root i get the same above error > > > so what i am asking is how do i setup a cron job to execute as user db2inst1?? > > thanks > > Ralph
Re: Cron
This should be unnecessary. All that should be required is to logon to the system as db2inst1 (or su - db2inst1 from root), and then crontab -e add command to the schedule :x exit (from being db2inst1) Cron runs all cron jobs as the user that created the crontab entry. I would like to see the complete crontab entry to see if there is anything else wrong with it that might be causing some kind of problem. Mark Post -Original Message- From: Nix, Robert P. [mailto:[EMAIL PROTECTED] Sent: Friday, January 09, 2004 4:15 PM To: [EMAIL PROTECTED] Subject: Re: Cron Have cron execute the following command, or similar: su - db2inst1 /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm Robert P. Nixinternet: [EMAIL PROTECTED] Mayo Clinic phone: 507-284-0844 RO-CE-8-857page: 507-270-1182 200 First St. SW Rochester, MN 55905 "Codito, Ergo Sum" "In theory, theory and practice are the same, but in practice, theory and practice are different." > -Original Message- > From: Noll, Ralph [SMTP:[EMAIL PROTECTED] > Sent: Friday, January 09, 2004 3:03 PM > To: [EMAIL PROTECTED] > Subject: Cron > > I am trying to execute a cron job to backup db2.. > > my db2 user is db2inst1 > > i setup the crontab job as db2inst1 > > when i run it i get an error > > Output from command /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm .. > > SQL10007N Message "-1390" could not be retrieved. Reason code: "1". > > If I run the backup job logged in as db2inst1 no problem > > if i run the job logged in as root i get the same above error > > > so what i am asking is how do i setup a cron job to execute as user db2inst1?? > > thanks > > Ralph
Re: Cron
30 17 * * * /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm above is what is in my db2inst1 crontab file Ralph > -Original Message- > From: Post, Mark K [mailto:[EMAIL PROTECTED] > Sent: Friday, January 09, 2004 3:38 PM > To: [EMAIL PROTECTED] > Subject: Re: Cron > > > This should be unnecessary. All that should be required is > to logon to the > system as db2inst1 (or su - db2inst1 from root), and then > crontab -e > add command to the schedule > :x > exit (from being db2inst1) > > Cron runs all cron jobs as the user that created the crontab > entry. I would > like to see the complete crontab entry to see if there is > anything else > wrong with it that might be causing some kind of problem. > > > Mark Post > > -Original Message- > From: Nix, Robert P. [mailto:[EMAIL PROTECTED] > Sent: Friday, January 09, 2004 4:15 PM > To: [EMAIL PROTECTED] > Subject: Re: Cron > > > Have cron execute the following command, or similar: > > su - db2inst1 /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm > > > Robert P. Nixinternet: [EMAIL PROTECTED] > Mayo Clinic phone: 507-284-0844 > RO-CE-8-857page: 507-270-1182 > 200 First St. SW > Rochester, MN 55905 > "Codito, Ergo Sum" > "In theory, theory and practice are the same, > but in practice, theory and practice are different." > > > > > -Original Message- > > From: Noll, Ralph [SMTP:[EMAIL PROTECTED] > > Sent: Friday, January 09, 2004 3:03 PM > > To: [EMAIL PROTECTED] > > Subject: Cron > > > > I am trying to execute a cron job to backup db2.. > > > > my db2 user is db2inst1 > > > > i setup the crontab job as db2inst1 > > > > when i run it i get an error > > > > Output from command /opt/IBM/db2/V8.1/bin/db2 backup db > parks use tsm .. > > > > SQL10007N Message "-1390" could not be retrieved. Reason code: "1". > > > > If I run the backup job logged in as db2inst1 no problem > > > > if i run the job logged in as root i get the same above error > > > > > > so what i am asking is how do i setup a cron job to execute as user > db2inst1?? > > > > thanks > > > > Ralph > >
Re: Cron
Ralph, Usually the db2inst1 user is set up to execute the db2profile script in /home/db2inst1/sqllib/db2profile. I think this message is related to not executing that script. Try adding: . /home/db2inst1/sqllib/db2profile to /home/db2inst1/.profile or /home/db2inst1/.bash_profile then try your cron job again. On Fri, 2004-01-09 at 15:03, Noll, Ralph wrote: > I am trying to execute a cron job to backup db2.. > > my db2 user is db2inst1 > > i setup the crontab job as db2inst1 > > when i run it i get an error > > Output from command /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm .. > > SQL10007N Message "-1390" could not be retrieved. Reason code: "1". > > If I run the backup job logged in as db2inst1 no problem > > if i run the job logged in as root i get the same above error > > > so what i am asking is how do i setup a cron job to execute as user db2inst1?? > > thanks > > Ralph -- Rich Smrcina Sr. Systems Engineer Sytek Services - A Division of DSG Milwaukee, WI rsmrcina at wi.rr.com rsmrcina at dsgroup.com Catch the WAVV! Stay for requirements and the free-for-all. Update your zSeries skills in 4 days for a very reasonable price. WAVV 2004 in Chattanooga, TN April 30-May 4, 2004 For details see http://www.wavv.org
Re: Cron
cat .profile # Sample .profile for SuSE Linux # rewritten by Christian Steinruecken <[EMAIL PROTECTED]> # # This file is read each time a login shell is started. # All other interactive shells will only read .bashrc; this is particularly # important for language settings, see below. test -z "$PROFILEREAD" && . /etc/profile # Most applications support several languages for their output. # To make use of this feature, simply uncomment one of the lines below or # add your own one (see /usr/share/locale/locale.alias for more codes) # #export [EMAIL PROTECTED] # uncomment this line for German output #export [EMAIL PROTECTED] # uncomment this line for French output #export [EMAIL PROTECTED] # uncomment this line for Spanish output # Some people don't like fortune. If you uncomment the following lines, # you will have a fortune each time you log in ;-) #if [ -x /usr/bin/fortune ] ; then #echo #/usr/bin/fortune #echo #fi # The following three lines have been added by UDB DB2. >>>>>>>>>>>>>>>>>>>>>>>>>>>>> if [ -f /home/db2inst1/sqllib/db2profile ]; then . /home/db2inst1/sqllib/db2profile fi zvmlinx1:/home/db2inst1 # looks like it is already there see the >>>>>>>>>>>>>>>>>>> -Original Message- From: Rich Smrcina [mailto:[EMAIL PROTECTED] Sent: Saturday, January 10, 2004 7:31 PM To: [EMAIL PROTECTED] Subject: Re: Cron Ralph, Usually the db2inst1 user is set up to execute the db2profile script in /home/db2inst1/sqllib/db2profile. I think this message is related to not executing that script. Try adding: . /home/db2inst1/sqllib/db2profile to /home/db2inst1/.profile or /home/db2inst1/.bash_profile then try your cron job again. On Fri, 2004-01-09 at 15:03, Noll, Ralph wrote: > I am trying to execute a cron job to backup db2.. > > my db2 user is db2inst1 > > i setup the crontab job as db2inst1 > > when i run it i get an error > > Output from command /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm .. > > SQL10007N Message "-1390" could not be retrieved. Reason code: "1". > > If I run the backup job logged in as db2inst1 no problem > > if i run the job logged in as root i get the same above error > > > so what i am asking is how do i setup a cron job to execute as user db2inst1?? > > thanks > > Ralph -- Rich Smrcina Sr. Systems Engineer Sytek Services - A Division of DSG Milwaukee, WI rsmrcina at wi.rr.com rsmrcina at dsgroup.com Catch the WAVV! Stay for requirements and the free-for-all. Update your zSeries skills in 4 days for a very reasonable price. WAVV 2004 in Chattanooga, TN April 30-May 4, 2004 For details see http://www.wavv.org
Re: Cron
Can you sign on as db2inst1 and execute the command manually? On Sat, 2004-01-10 at 21:09, Noll, Ralph wrote: > cat .profile > # Sample .profile for SuSE Linux > # rewritten by Christian Steinruecken <[EMAIL PROTECTED]> > # > # This file is read each time a login shell is started. > # All other interactive shells will only read .bashrc; this is particularly > # important for language settings, see below. > > test -z "$PROFILEREAD" && . /etc/profile > > # Most applications support several languages for their output. > # To make use of this feature, simply uncomment one of the lines below or > # add your own one (see /usr/share/locale/locale.alias for more codes) > # > #export [EMAIL PROTECTED] # uncomment this line for German output > #export [EMAIL PROTECTED] # uncomment this line for French output > #export [EMAIL PROTECTED] # uncomment this line for Spanish output > > > # Some people don't like fortune. If you uncomment the following lines, > # you will have a fortune each time you log in ;-) > > #if [ -x /usr/bin/fortune ] ; then > #echo > #/usr/bin/fortune > #echo > #fi > > # The following three lines have been added by UDB DB2. > >>>>>>>>>>>>>>>>>>>>>>>>>>>>> > if [ -f /home/db2inst1/sqllib/db2profile ]; then > . /home/db2inst1/sqllib/db2profile > fi > > > zvmlinx1:/home/db2inst1 # > > looks like it is already there see the >>>>>>>>>>>>>>>>>>> > > -Original Message- > From: Rich Smrcina [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 10, 2004 7:31 PM > To: [EMAIL PROTECTED] > Subject: Re: Cron > > > Ralph, > > Usually the db2inst1 user is set up to execute the db2profile script in > /home/db2inst1/sqllib/db2profile. I think this message is related to > not executing that script. > > Try adding: > > . /home/db2inst1/sqllib/db2profile > > to /home/db2inst1/.profile or /home/db2inst1/.bash_profile > > then try your cron job again. > > On Fri, 2004-01-09 at 15:03, Noll, Ralph wrote: > > I am trying to execute a cron job to backup db2.. > > > > my db2 user is db2inst1 > > > > i setup the crontab job as db2inst1 > > > > when i run it i get an error > > > > Output from command /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm .. > > > > SQL10007N Message "-1390" could not be retrieved. Reason code: "1". > > > > If I run the backup job logged in as db2inst1 no problem > > > > if i run the job logged in as root i get the same above error > > > > > > so what i am asking is how do i setup a cron job to execute as user db2inst1?? > > > > thanks > > > > Ralph > -- > Rich Smrcina > Sr. Systems Engineer > Sytek Services - A Division of DSG > Milwaukee, WI > rsmrcina at wi.rr.com > rsmrcina at dsgroup.com > > Catch the WAVV! Stay for requirements and the free-for-all. > Update your zSeries skills in 4 days for a very reasonable price. > WAVV 2004 in Chattanooga, TN > April 30-May 4, 2004 > For details see http://www.wavv.org -- Rich Smrcina Sr. Systems Engineer Sytek Services - A Division of DSG Milwaukee, WI rsmrcina at wi.rr.com rsmrcina at dsgroup.com Catch the WAVV! Stay for requirements and the free-for-all. Update your zSeries skills in 4 days for a very reasonable price. WAVV 2004 in Chattanooga, TN April 30-May 4, 2004 For details see http://www.wavv.org
Re: Cron
yes -Original Message- From: Rich Smrcina [mailto:[EMAIL PROTECTED] Sent: Saturday, January 10, 2004 9:16 PM To: [EMAIL PROTECTED] Subject: Re: Cron Can you sign on as db2inst1 and execute the command manually? On Sat, 2004-01-10 at 21:09, Noll, Ralph wrote: > cat .profile > # Sample .profile for SuSE Linux > # rewritten by Christian Steinruecken <[EMAIL PROTECTED]> > # > # This file is read each time a login shell is started. > # All other interactive shells will only read .bashrc; this is particularly > # important for language settings, see below. > > test -z "$PROFILEREAD" && . /etc/profile > > # Most applications support several languages for their output. > # To make use of this feature, simply uncomment one of the lines below or > # add your own one (see /usr/share/locale/locale.alias for more codes) > # > #export [EMAIL PROTECTED] # uncomment this line for German output > #export [EMAIL PROTECTED] # uncomment this line for French output > #export [EMAIL PROTECTED] # uncomment this line for Spanish output > > > # Some people don't like fortune. If you uncomment the following lines, > # you will have a fortune each time you log in ;-) > > #if [ -x /usr/bin/fortune ] ; then > #echo > #/usr/bin/fortune > #echo > #fi > > # The following three lines have been added by UDB DB2. > >>>>>>>>>>>>>>>>>>>>>>>>>>>>> > if [ -f /home/db2inst1/sqllib/db2profile ]; then > . /home/db2inst1/sqllib/db2profile > fi > > > zvmlinx1:/home/db2inst1 # > > looks like it is already there see the >>>>>>>>>>>>>>>>>>> > > -Original Message- > From: Rich Smrcina [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 10, 2004 7:31 PM > To: [EMAIL PROTECTED] > Subject: Re: Cron > > > Ralph, > > Usually the db2inst1 user is set up to execute the db2profile script in > /home/db2inst1/sqllib/db2profile. I think this message is related to > not executing that script. > > Try adding: > > . /home/db2inst1/sqllib/db2profile > > to /home/db2inst1/.profile or /home/db2inst1/.bash_profile > > then try your cron job again. > > On Fri, 2004-01-09 at 15:03, Noll, Ralph wrote: > > I am trying to execute a cron job to backup db2.. > > > > my db2 user is db2inst1 > > > > i setup the crontab job as db2inst1 > > > > when i run it i get an error > > > > Output from command /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm .. > > > > SQL10007N Message "-1390" could not be retrieved. Reason code: "1". > > > > If I run the backup job logged in as db2inst1 no problem > > > > if i run the job logged in as root i get the same above error > > > > > > so what i am asking is how do i setup a cron job to execute as user db2inst1?? > > > > thanks > > > > Ralph > -- > Rich Smrcina > Sr. Systems Engineer > Sytek Services - A Division of DSG > Milwaukee, WI > rsmrcina at wi.rr.com > rsmrcina at dsgroup.com > > Catch the WAVV! Stay for requirements and the free-for-all. > Update your zSeries skills in 4 days for a very reasonable price. > WAVV 2004 in Chattanooga, TN > April 30-May 4, 2004 > For details see http://www.wavv.org -- Rich Smrcina Sr. Systems Engineer Sytek Services - A Division of DSG Milwaukee, WI rsmrcina at wi.rr.com rsmrcina at dsgroup.com Catch the WAVV! Stay for requirements and the free-for-all. Update your zSeries skills in 4 days for a very reasonable price. WAVV 2004 in Chattanooga, TN April 30-May 4, 2004 For details see http://www.wavv.org
Re: Cron
or i can sign on as root su to db2inst1 and run the backup job -Original Message- From: Rich Smrcina [mailto:[EMAIL PROTECTED] Sent: Saturday, January 10, 2004 9:16 PM To: [EMAIL PROTECTED] Subject: Re: Cron Can you sign on as db2inst1 and execute the command manually? On Sat, 2004-01-10 at 21:09, Noll, Ralph wrote: > cat .profile > # Sample .profile for SuSE Linux > # rewritten by Christian Steinruecken <[EMAIL PROTECTED]> > # > # This file is read each time a login shell is started. > # All other interactive shells will only read .bashrc; this is particularly > # important for language settings, see below. > > test -z "$PROFILEREAD" && . /etc/profile > > # Most applications support several languages for their output. > # To make use of this feature, simply uncomment one of the lines below or > # add your own one (see /usr/share/locale/locale.alias for more codes) > # > #export [EMAIL PROTECTED] # uncomment this line for German output > #export [EMAIL PROTECTED] # uncomment this line for French output > #export [EMAIL PROTECTED] # uncomment this line for Spanish output > > > # Some people don't like fortune. If you uncomment the following lines, > # you will have a fortune each time you log in ;-) > > #if [ -x /usr/bin/fortune ] ; then > #echo > #/usr/bin/fortune > #echo > #fi > > # The following three lines have been added by UDB DB2. > >>>>>>>>>>>>>>>>>>>>>>>>>>>>> > if [ -f /home/db2inst1/sqllib/db2profile ]; then > . /home/db2inst1/sqllib/db2profile > fi > > > zvmlinx1:/home/db2inst1 # > > looks like it is already there see the >>>>>>>>>>>>>>>>>>> > > -Original Message- > From: Rich Smrcina [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 10, 2004 7:31 PM > To: [EMAIL PROTECTED] > Subject: Re: Cron > > > Ralph, > > Usually the db2inst1 user is set up to execute the db2profile script in > /home/db2inst1/sqllib/db2profile. I think this message is related to > not executing that script. > > Try adding: > > . /home/db2inst1/sqllib/db2profile > > to /home/db2inst1/.profile or /home/db2inst1/.bash_profile > > then try your cron job again. > > On Fri, 2004-01-09 at 15:03, Noll, Ralph wrote: > > I am trying to execute a cron job to backup db2.. > > > > my db2 user is db2inst1 > > > > i setup the crontab job as db2inst1 > > > > when i run it i get an error > > > > Output from command /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm .. > > > > SQL10007N Message "-1390" could not be retrieved. Reason code: "1". > > > > If I run the backup job logged in as db2inst1 no problem > > > > if i run the job logged in as root i get the same above error > > > > > > so what i am asking is how do i setup a cron job to execute as user db2inst1?? > > > > thanks > > > > Ralph > -- > Rich Smrcina > Sr. Systems Engineer > Sytek Services - A Division of DSG > Milwaukee, WI > rsmrcina at wi.rr.com > rsmrcina at dsgroup.com > > Catch the WAVV! Stay for requirements and the free-for-all. > Update your zSeries skills in 4 days for a very reasonable price. > WAVV 2004 in Chattanooga, TN > April 30-May 4, 2004 > For details see http://www.wavv.org -- Rich Smrcina Sr. Systems Engineer Sytek Services - A Division of DSG Milwaukee, WI rsmrcina at wi.rr.com rsmrcina at dsgroup.com Catch the WAVV! Stay for requirements and the free-for-all. Update your zSeries skills in 4 days for a very reasonable price. WAVV 2004 in Chattanooga, TN April 30-May 4, 2004 For details see http://www.wavv.org
Re: Cron
30 17 * * * db2 backup db sample use tsm above is my cron job for user db2inst1 I have gotten many mail msgs on root's mail that says can't execute binary file see below zvmlinx1:/home/db2inst1/sqllib/bin # mail Mail version 8.1 6/6/93. Type ? for help. "/var/mail/root": 3 messages 3 new >N 1 [EMAIL PROTECTED] Sat Jan 10 21:26 17/622 "Cron <[EMAIL PROTECTED]> " N 2 [EMAIL PROTECTED] Sat Jan 10 21:27 17/622 "Cron <[EMAIL PROTECTED]> " N 3 [EMAIL PROTECTED] Sat Jan 10 21:28 17/622 "Cron <[EMAIL PROTECTED]> " & Message 1: >From [EMAIL PROTECTED] Sat Jan 10 21:26:01 2004 Delivered-To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] (Cron Daemon) To: [EMAIL PROTECTED] Subject: Cron <[EMAIL PROTECTED]> su - db2inst1 db2 backup db sample use tsm X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: Date: Sat, 10 Jan 2004 21:26:01 -0600 (CST) db2: /home/db2inst1/sqllib/bin/db2: cannot execute binary file why is it trying the cron job... i thought i had it set for 17:30 every day every month every weekday??? Ralph
Re: Cron
Try the su command that someone else responded with earlier. On Sat, 2004-01-10 at 21:31, Noll, Ralph wrote: > 30 17 * * * db2 backup db sample use tsm > > above is my cron job for user db2inst1 > > I have gotten many mail msgs on root's mail > that says can't execute binary file > see below > > zvmlinx1:/home/db2inst1/sqllib/bin # mail > Mail version 8.1 6/6/93. Type ? for help. > "/var/mail/root": 3 messages 3 new > >N 1 [EMAIL PROTECTED] Sat Jan 10 21:26 17/622 "Cron <[EMAIL PROTECTED]> " > N 2 [EMAIL PROTECTED] Sat Jan 10 21:27 17/622 "Cron <[EMAIL PROTECTED]> " > N 3 [EMAIL PROTECTED] Sat Jan 10 21:28 17/622 "Cron <[EMAIL PROTECTED]> " > & > Message 1: > >From [EMAIL PROTECTED] Sat Jan 10 21:26:01 2004 > Delivered-To: [EMAIL PROTECTED] > From: [EMAIL PROTECTED] (Cron Daemon) > To: [EMAIL PROTECTED] > Subject: Cron <[EMAIL PROTECTED]> su - db2inst1 db2 backup db sample use tsm > X-Cron-Env: > X-Cron-Env: > X-Cron-Env: > X-Cron-Env: > Date: Sat, 10 Jan 2004 21:26:01 -0600 (CST) > > db2: /home/db2inst1/sqllib/bin/db2: cannot execute binary file > > why is it trying the cron job... > i thought i had it set for 17:30 every day every month every weekday??? > > Ralph -- Rich Smrcina Sr. Systems Engineer Sytek Services - A Division of DSG Milwaukee, WI rsmrcina at wi.rr.com rsmrcina at dsgroup.com Catch the WAVV! Stay for requirements and the free-for-all. Update your zSeries skills in 4 days for a very reasonable price. WAVV 2004 in Chattanooga, TN April 30-May 4, 2004 For details see http://www.wavv.org
Re: Cron
When cron jobs are run, login processing is _not_ performed. So the environment variables, such as PATH, etc., are _not_ set the same as when a login is done, or an "su -" command. If those things must be set, then the cron job should source those files before trying to do anything. Mark Post -Original Message- From: Rich Smrcina [mailto:[EMAIL PROTECTED] Sent: Saturday, January 10, 2004 8:31 PM To: [EMAIL PROTECTED] Subject: Re: Cron Ralph, Usually the db2inst1 user is set up to execute the db2profile script in /home/db2inst1/sqllib/db2profile. I think this message is related to not executing that script. Try adding: . /home/db2inst1/sqllib/db2profile to /home/db2inst1/.profile or /home/db2inst1/.bash_profile then try your cron job again. On Fri, 2004-01-09 at 15:03, Noll, Ralph wrote: > I am trying to execute a cron job to backup db2.. > > my db2 user is db2inst1 > > i setup the crontab job as db2inst1 > > when i run it i get an error > > Output from command /opt/IBM/db2/V8.1/bin/db2 backup db parks use tsm .. > > SQL10007N Message "-1390" could not be retrieved. Reason code: "1". > > If I run the backup job logged in as db2inst1 no problem > > if i run the job logged in as root i get the same above error > > > so what i am asking is how do i setup a cron job to execute as user db2inst1?? > > thanks > > Ralph -- Rich Smrcina Sr. Systems Engineer Sytek Services - A Division of DSG Milwaukee, WI rsmrcina at wi.rr.com rsmrcina at dsgroup.com Catch the WAVV! Stay for requirements and the free-for-all. Update your zSeries skills in 4 days for a very reasonable price. WAVV 2004 in Chattanooga, TN April 30-May 4, 2004 For details see http://www.wavv.org
Re: cron oddity?
On Thursday 16 November 2006 11:29, Mark D Pace wrote: >I've written a rexx program to run under cron to do clean up on a >directory. It runs fine when I run it myself, but it fails under cron. >Trace output from the cron run job shows > >"sudo ls -lGgh /srv/ftp/pub" >"-r--r--r-- 1 14M Nov 7 16:02 GE_Mainline_Ansys ver2.ppt" > >HUH? when I do it manually the output is >"sudo ls -lGgh /srv/ftp/pub" >"-r--r--r-- 1 14M 2006-11-07 16:02 GE_Mainline_Ansys ver2.ppt" > >If I manually do an ls command I get the format with the date as >-mm-dd.Why would the ls command under cron get a date format of >Month Day? Sounds like an environment difference, but I can't think of one that would change that. That -MM-DD format is not the normal ls(1) output I'm used to seeing, so I suspect your shell has something in its environment that changes it. Do "env | grep LS" to look for any environment variables related to ls. Use /bin/ls directly instead of letting your shell search your PATH. Is POSIXLY_CORRECT set? I'm not able to get my ls to produce that form of output. Your cron job is producing the normal output that I'm used to seeing. The closest I get to your shell output is using the --full-time option, but that gives even stranger output: -rw-r--r-- 1 mack users0 2006-11-16 11:49:44.0 -0500 foo I hope this helps! - MacK. - Edmund R. MacKenty Software Architect Rocket Software, Inc. Newton, MA USA -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
I get the same results using ls or /bin/ls [EMAIL PROTECTED]:~> /bin/ls -l total 41420 drwxr-xr-x 2 marpace users 4096 2006-11-16 09:30 bin [EMAIL PROTECTED]:~> ls -l total 41420 drwxr-xr-x 2 marpace users 4096 2006-11-16 09:30 bin I just tried this on my PC linux and get the same results. [EMAIL PROTECTED]:~> env | grep LS LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32: XNLSPATH=/usr/X11R6/lib/X11/nls LS_OPTIONS=-N --color=tty -T 0 Mark D Pace Senior Systems Engineer Mainline Information Systems 1700 Summit Lake Drive Tallahassee, FL. 32317 Office: 850.219.5184 Fax: 888.221.9862 http://www.mainline.com This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
I can't reproduce this, but my guess is that some ls option is being set in /etc/profile. The cron jobs don't source /etc/profile. You could source /etc/profile in your cron job with ". /etc/profile" and see if that makes it work. -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of Mark D Pace Sent: Thursday, November 16, 2006 8:29 AM To: LINUX-390@VM.MARIST.EDU Subject: cron oddity? I've written a rexx program to run under cron to do clean up on a directory. It runs fine when I run it myself, but it fails under cron. Trace output from the cron run job shows "sudo ls -lGgh /srv/ftp/pub" "-r--r--r-- 1 14M Nov 7 16:02 GE_Mainline_Ansys ver2.ppt" HUH? when I do it manually the output is "sudo ls -lGgh /srv/ftp/pub" "-r--r--r-- 1 14M 2006-11-07 16:02 GE_Mainline_Ansys ver2.ppt" If I manually do an ls command I get the format with the date as -mm-dd.Why would the ls command under cron get a date format of Month Day? Very confused Mark D Pace Senior Systems Engineer Mainline Information Systems 1700 Summit Lake Drive Tallahassee, FL. 32317 Office: 850.219.5184 Fax: 888.221.9862 http://www.mainline.com This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
On Thursday 16 November 2006 12:48, Mark D Pace wrote: >I get the same results using ls or /bin/ls > >[EMAIL PROTECTED]:~> /bin/ls -l >total 41420 >drwxr-xr-x 2 marpace users 4096 2006-11-16 09:30 bin This is too wierd! I can't get that -MM-DD format out of my ls at all. Does anybody else get that output format? - MacK. - Edmund R. MacKenty Software Architect Rocket Software, Inc. Newton, MA USA -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
ls -al --time-style=long-iso Gives you the -mm-dd Valid arguments are: - `full-iso' - `long-iso' - `iso' - `locale' So, must be related to locale setting? Marcy Cortes "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of Edmund R. MacKenty Sent: Thursday, November 16, 2006 10:25 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: [LINUX-390] cron oddity? On Thursday 16 November 2006 12:48, Mark D Pace wrote: >I get the same results using ls or /bin/ls > >[EMAIL PROTECTED]:~> /bin/ls -l >total 41420 >drwxr-xr-x 2 marpace users 4096 2006-11-16 09:30 bin This is too wierd! I can't get that -MM-DD format out of my ls at all. Does anybody else get that output format? - MacK. - Edmund R. MacKenty Software Architect Rocket Software, Inc. Newton, MA USA -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
> -Original Message- > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On > Behalf Of Marcy Cortes > Sent: Thursday, November 16, 2006 12:57 PM > To: LINUX-390@VM.MARIST.EDU > Subject: Re: cron oddity? > > > ls -al --time-style=long-iso > > Gives you the -mm-dd > > Valid arguments are: > - `full-iso' > - `long-iso' > - `iso' > - `locale' > > So, must be related to locale setting? > > > Marcy Cortes Or a bash "alias" perhaps. I use those a lot. -- John McKown Senior Systems Programmer HealthMarkets Keeping the Promise of Affordable Coverage Administrative Services Group Information Technology This message (including any attachments) contains confidential information intended for a specific individual and purpose, and its content is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this transmission, or taking any action based on it, is strictly prohibited. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
> I can't reproduce this, but my guess is that some ls option is being set in /etc/profile. The cron jobs don't source /etc/profile. >You could source /etc/profile in your cron job with ". /etc/profile" and see if that makes it work. I added address system '. /etc/profile' to my rexx program. No change to the ls output. I could change the program to accept the other date format, but then it wouldn't work when I want to run it manually. Plus since I am doing this based on dates, the -mm-dd format is really what I need. Mark D Pace Senior Systems Engineer Mainline Information Systems 1700 Summit Lake Drive Tallahassee, FL. 32317 Office: 850.219.5184 Fax: 888.221.9862 http://www.mainline.com This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
Or an alias? Marcy Cortes wrote: ls -al --time-style=long-iso Gives you the -mm-dd Valid arguments are: - `full-iso' - `long-iso' - `iso' - `locale' So, must be related to locale setting? Marcy Cortes "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of Edmund R. MacKenty Sent: Thursday, November 16, 2006 10:25 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: [LINUX-390] cron oddity? On Thursday 16 November 2006 12:48, Mark D Pace wrote: I get the same results using ls or /bin/ls [EMAIL PROTECTED]:~> /bin/ls -l total 41420 drwxr-xr-x 2 marpace users 4096 2006-11-16 09:30 bin This is too wierd! I can't get that -MM-DD format out of my ls at all. Does anybody else get that output format? - MacK. - Edmund R. MacKenty Software Architect Rocket Software, Inc. Newton, MA USA -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- Rich Smrcina VM Assist, Inc. Phone: 414-491-6001 Ans Service: 360-715-2467 rich.smrcina at vmassist.com Catch the WAVV! http://www.wavv.org WAVV 2007 - Green Bay, WI - May 18-22, 2007 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
Right. I was thinking he had it the other way around with the cron one acting unexpectedly. But, anyway, Mark can solve his prob with the --time-style option :) Looks like the aliases already set up in the default shell are in var $LS_OPTIONS. These seem to be as shipped in SuSE: [EMAIL PROTECTED]:~> alias | grep ls alias dir='ls -l' alias l='ls -alF' alias la='ls -la' alias ll='ls -l' alias ls='ls $LS_OPTIONS' alias ls-l='ls -l' alias unmount='echo "Error: Try the command: umount" 1>&2; false' [EMAIL PROTECTED]:~> echo $LS_OPTIONS -N --color=tty -T 0 Marcy Cortes "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of Rich Smrcina Sent: Thursday, November 16, 2006 11:03 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: [LINUX-390] cron oddity? Or an alias? Marcy Cortes wrote: > ls -al --time-style=long-iso > > Gives you the -mm-dd > > Valid arguments are: > - `full-iso' > - `long-iso' > - `iso' > - `locale' > > So, must be related to locale setting? > > > Marcy Cortes > > > "This message may contain confidential and/or privileged information. > If you are not the addressee or authorized to receive this for the > addressee, you must not use, copy, disclose, or take any action based > on this message or any information herein. If you have received this > message in error, please advise the sender immediately by reply e-mail > and delete this message. Thank you for your cooperation." > > > -Original Message- > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of > Edmund R. MacKenty > Sent: Thursday, November 16, 2006 10:25 AM > To: LINUX-390@VM.MARIST.EDU > Subject: Re: [LINUX-390] cron oddity? > > On Thursday 16 November 2006 12:48, Mark D Pace wrote: >> I get the same results using ls or /bin/ls >> >> [EMAIL PROTECTED]:~> /bin/ls -l >> total 41420 >> drwxr-xr-x 2 marpace users 4096 2006-11-16 09:30 bin > > This is too wierd! I can't get that -MM-DD format out of my ls at > all. > Does anybody else get that output format? > - MacK. > - > Edmund R. MacKenty > Software Architect > Rocket Software, Inc. > Newton, MA USA > > -- > For LINUX-390 subscribe / signoff / archive access instructions, send > email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or > visit http://www.marist.edu/htbin/wlvindex?LINUX-390 > > -- > For LINUX-390 subscribe / signoff / archive access instructions, send > email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or > visit http://www.marist.edu/htbin/wlvindex?LINUX-390 > -- Rich Smrcina VM Assist, Inc. Phone: 414-491-6001 Ans Service: 360-715-2467 rich.smrcina at vmassist.com Catch the WAVV! http://www.wavv.org WAVV 2007 - Green Bay, WI - May 18-22, 2007 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
I don't know rexx, but I would guess that address system creates a new shell environment that will not change the rexx environment. The sourcing of /etc/profile would need to be in the crontab file at a point before you invoke the rexx script. Probably something like ". /etc/profile;do_the_rexx_script" -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of Mark D Pace Sent: Thursday, November 16, 2006 11:00 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: cron oddity? > I can't reproduce this, but my guess is that some ls option is being set in /etc/profile. The cron jobs don't source /etc/profile. >You could source /etc/profile in your cron job with ". /etc/profile" and see if that makes it work. I added address system '. /etc/profile' to my rexx program. No change to the ls output. I could change the program to accept the other date format, but then it wouldn't work when I want to run it manually. Plus since I am doing this based on dates, the -mm-dd format is really what I need. Mark D Pace Senior Systems Engineer Mainline Information Systems 1700 Summit Lake Drive Tallahassee, FL. 32317 Office: 850.219.5184 Fax: 888.221.9862 http://www.mainline.com This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
On Thursday 16 November 2006 13:56, Marcy Cortes wrote: >ls -al --time-style=long-iso > >Gives you the -mm-dd Doh! I missed that option. So the fix would be to use "-l --time-style=long-iso" in your cron script to force it to use the format you want. - MacK. - Edmund R. MacKenty Software Architect Rocket Software, Inc. Newton, MA USA -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
Thanks, Marcy, I think adding the --time-style=long-iso is the way to go. Now I'm having some issues even getting cron to run the code. I've probably messed up something from changing my crontab constantly. Mark D Pace Senior Systems Engineer Mainline Information Systems 1700 Summit Lake Drive Tallahassee, FL. 32317 Office: 850.219.5184 Fax: 888.221.9862 http://www.mainline.com This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
I got it to work by adding --time-style=long-iso to the ls command in the rexx code. I'm going to have to rethink how I design the code, so that my development environment matches the cron environment. Thanks, everyone, for the help. Mark D Pace Senior Systems Engineer Mainline Information Systems 1700 Summit Lake Drive Tallahassee, FL. 32317 Office: 850.219.5184 Fax: 888.221.9862 http://www.mainline.com This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron oddity?
Ls -l --time-style long-iso produces your original output, but I don't know how you're getting it set. Do you have something odd in your locale settings? Remember that cron does not run in your login shell, net even in a standard system login shell. None of your environment variables get set, and you should not depend on any of them. One solution to your problem (though it won't track down its cause) would be to add the --time-style long-iso to your cron ls command. -- .~.Robert P. Nix Mayo Foundation /V\RO-OC-1-13 200 First Street SW /( )\ 507-284-0844Rochester, MN 55905 ^^-^^ - "In theory, theory and practice are the same, but in practice, theory and practice are different." -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of Fargusson.Alan Sent: Thursday, November 16, 2006 12:19 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: cron oddity? I can't reproduce this, but my guess is that some ls option is being set in /etc/profile. The cron jobs don't source /etc/profile. You could source /etc/profile in your cron job with ". /etc/profile" and see if that makes it work. -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of Mark D Pace Sent: Thursday, November 16, 2006 8:29 AM To: LINUX-390@VM.MARIST.EDU Subject: cron oddity? I've written a rexx program to run under cron to do clean up on a directory. It runs fine when I run it myself, but it fails under cron. Trace output from the cron run job shows "sudo ls -lGgh /srv/ftp/pub" "-r--r--r-- 1 14M Nov 7 16:02 GE_Mainline_Ansys ver2.ppt" HUH? when I do it manually the output is "sudo ls -lGgh /srv/ftp/pub" "-r--r--r-- 1 14M 2006-11-07 16:02 GE_Mainline_Ansys ver2.ppt" If I manually do an ls command I get the format with the date as -mm-dd.Why would the ls command under cron get a date format of Month Day? Very confused Mark D Pace Senior Systems Engineer Mainline Information Systems 1700 Summit Lake Drive Tallahassee, FL. 32317 Office: 850.219.5184 Fax: 888.221.9862 http://www.mainline.com This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Cron question
> and if I read this right, I needed to fire off crontab -u > {userid} to make > it work... Usually, you use 'crontab -e' to create the entry, and that installs all the right magic. Is it just not firing, or ??? -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Cron question
James, First thing is upgrade to a more recent version. Slackware 10.1 was just released, so that would be a good choice. Second thing, once you create the crontab for the user, crond finds it and executes it. You shouldn't have to do anything special to make it start executing. The only thing I see in the cron man page on my Slackware system that would apply to your situation is crontab -e [user] - edit crontab for user Which you would use to create the crontab file in the first place. Later versions of Slackware do have the /etc/crond.?? Structure, but that is for system tasks that run as root, not for individual users such as you're doing. Mark Post -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of James Melin Sent: Thursday, February 10, 2005 9:49 AM To: LINUX-390@VM.MARIST.EDU Subject: Cron question I feel as tho I am somewhat cron-tarded. I just don't seem to get it.. Granted this might be because the desktop system I'm using to build the el-cheapo monitor widget is running Slackware version 8. but that said On this system, the cron tabs are in /var/spool/cron/crontabs. I created one for the user ID I am using to do the information gathering, which looks like this 1-59/3 * * * * cd /home/statmon ; status.sh 1> /dev/null 2> /dev/null and if I read this right, I needed to fire off crontab -u {userid} to make it work... but it doesn't. The documentation I have is for SuSE, so the whole cron.weekly, cron.daily doesn't seem to be there either. If anyone can beat a clue through this extra thick cranium, I would be delighted. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Cron question
Slackware 8 is on there cuz that's what I had lying around - Must be the mental blocks my mother gave me for christmas, but I've always have had trouble with Cron. And I agree, I should upgrade to a newer flavor of slack. "Post, Mark K" <[EMAIL PROTECTED] m> To Sent by: Linux on LINUX-390@VM.MARIST.EDU 390 Port cc <[EMAIL PROTECTED] IST.EDU> Subject Re: Cron question 02/10/2005 09:28 AM Please respond to Linux on 390 Port <[EMAIL PROTECTED] IST.EDU> James, First thing is upgrade to a more recent version. Slackware 10.1 was just released, so that would be a good choice. Second thing, once you create the crontab for the user, crond finds it and executes it. You shouldn't have to do anything special to make it start executing. The only thing I see in the cron man page on my Slackware system that would apply to your situation is crontab -e [user] - edit crontab for user Which you would use to create the crontab file in the first place. Later versions of Slackware do have the /etc/crond.?? Structure, but that is for system tasks that run as root, not for individual users such as you're doing. Mark Post -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of James Melin Sent: Thursday, February 10, 2005 9:49 AM To: LINUX-390@VM.MARIST.EDU Subject: Cron question I feel as tho I am somewhat cron-tarded. I just don't seem to get it.. Granted this might be because the desktop system I'm using to build the el-cheapo monitor widget is running Slackware version 8. but that said On this system, the cron tabs are in /var/spool/cron/crontabs. I created one for the user ID I am using to do the information gathering, which looks like this 1-59/3 * * * * cd /home/statmon ; status.sh 1> /dev/null 2> /dev/null and if I read this right, I needed to fire off crontab -u {userid} to make it work... but it doesn't. The documentation I have is for SuSE, so the whole cron.weekly, cron.daily doesn't seem to be there either. If anyone can beat a clue through this extra thick cranium, I would be delighted. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Cron question
It is not firing I'm not sure if I have the syntax correct to have it run every 3 min 1-59/3 * * * * cd /home/statmon ; status.sh 1> /dev/null 2> /dev/null If I understand this correctly Minutes 1-59, every three minutes, is what I am asking it to do I used the crontab -e {username} per your suggestion, but it appears to have changed nothing. David Boyes <[EMAIL PROTECTED] e.net> To Sent by: Linux on LINUX-390@VM.MARIST.EDU 390 Port cc <[EMAIL PROTECTED] IST.EDU> Subject Re: Cron question 02/10/2005 08:56 AM Please respond to Linux on 390 Port <[EMAIL PROTECTED] IST.EDU> > and if I read this right, I needed to fire off crontab -u > {userid} to make > it work... Usually, you use 'crontab -e' to create the entry, and that installs all the right magic. Is it just not firing, or ??? -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Cron question
On Feb 10, 2005, at 11:51 AM, James Melin wrote: It is not firing I'm not sure if I have the syntax correct to have it run every 3 min 1-59/3 * * * * cd /home/statmon ; status.sh 1> /dev/null 2> /dev/null If I understand this correctly Minutes 1-59, every three minutes, is what I am asking it to do I used the crontab -e {username} per your suggestion, but it appears to have changed nothing. The current directory should not be in the Unix path. So try making the command . /home/statmon/status.sh 1&2>/dev/null and see if that helps. (I assume status.sh doesn't need to be run from /home/statmon, but if so, cd there first. Adam -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Cron question
Does anything show up in /var/log/cron? This should at least show an entry if cron trys to run the job. -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of James Melin Sent: Thursday, February 10, 2005 9:52 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: Cron question It is not firing I'm not sure if I have the syntax correct to have it run every 3 min 1-59/3 * * * * cd /home/statmon ; status.sh 1> /dev/null 2> /dev/null If I understand this correctly Minutes 1-59, every three minutes, is what I am asking it to do I used the crontab -e {username} per your suggestion, but it appears to have changed nothing. David Boyes <[EMAIL PROTECTED] e.net> To Sent by: Linux on LINUX-390@VM.MARIST.EDU 390 Port cc <[EMAIL PROTECTED] IST.EDU> Subject Re: Cron question 02/10/2005 08:56 AM Please respond to Linux on 390 Port <[EMAIL PROTECTED] IST.EDU> > and if I read this right, I needed to fire off crontab -u > {userid} to make > it work... Usually, you use 'crontab -e' to create the entry, and that installs all the right magic. Is it just not firing, or ??? -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Cron question
I think that did it. I'll be monitoring Adam Thornton <[EMAIL PROTECTED] mine.net> To Sent by: Linux on LINUX-390@VM.MARIST.EDU 390 Port cc <[EMAIL PROTECTED] IST.EDU> Subject Re: Cron question 02/10/2005 12:03 PM Please respond to Linux on 390 Port <[EMAIL PROTECTED] IST.EDU> On Feb 10, 2005, at 11:51 AM, James Melin wrote: > It is not firing I'm not sure if I have the syntax correct to have > it > run every 3 min > > 1-59/3 * * * * cd /home/statmon ; status.sh 1> /dev/null 2> > /dev/null > > If I understand this correctly Minutes 1-59, every three minutes, is > what I > am asking it to do > > I used the crontab -e {username} per your suggestion, but it appears to > have changed nothing. > The current directory should not be in the Unix path. So try making the command . /home/statmon/status.sh 1&2>/dev/null and see if that helps. (I assume status.sh doesn't need to be run from /home/statmon, but if so, cd there first. Adam -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
cron stopped working???
After an un-scheduled IPL of the z/OS LPAR, a linux guest running on the IFL had problems this morning. The cron stopped scheduling jobs. I restarted it, stopped and started but till now no results. The job runs every minute. So it should be kicking in at the top of the minute. I never had a stoppage like this. I could not find any logs for cron. My job logs clearly indicate the stoppage. I left with the only alternative of cycling the guest Any ideas? __ Ranga Nathan / CSG Systems Programmer - Specialist; Technical Services; BAX Global Inc. Irvine-California Tel: 714-442-7591 Fax: 714-442-2840 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
a question on cron
I have a task which must run every other wednesday. I've looked through the cron info and found that I can use a 3/2 for my last entry to tell cron to run the task every other wednesday. My question is will cron start the task this coming week(5/7) or will it start the task (5/14) which is when I need it to start and go on from there. The entry looks like this: 45 18 * * 3/2 thanks Mace Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron stopped working???
Is the cron daemon running? Is there any mail from cron in root's mailbox that may indicate the problem? tom - - - - - - - - - - - - Toto, I have a feeling we're not in the mainframe world any more. _/) Tom Shilson ~Unix Team / IT Server Services Aloha Tel: 651-733-7591 tshilson at mmm dot com Fax: 651-736-7689 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron stopped working???
Thanks, I checked all that. I found the problem. My scheduled shell script checks if my perl program is already running. If so, it does not run the perl program. With the outage on the z/OS side, the script that was running continuted to hang. As a result, no further executions took place. My clever script failed here :-( __ Ranga Nathan / CSG Systems Programmer - Specialist; Technical Services; BAX Global Inc. Irvine-California Tel: 714-442-7591 Fax: 714-442-2840 Tom Shilson <[EMAIL PROTECTED]> Sent by: Linux on 390 Port 03/12/2005 08:51 AM Please respond to Linux on 390 Port To LINUX-390@VM.MARIST.EDU cc Subject Re: cron stopped working??? Is the cron daemon running? Is there any mail from cron in root's mailbox that may indicate the problem? tom - - - - - - - - - - - - Toto, I have a feeling we're not in the mainframe world any more. _/) Tom Shilson ~Unix Team / IT Server Services Aloha Tel: 651-733-7591 tshilson at mmm dot com Fax: 651-736-7689 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Cron sending e-mail
I have this entry in /etc/crontab 10 * * * * root /usr/sbin/ntpdate -u condor I am getting e-mails every hour that this ran. How do I suppress e-mails to root about this?
problem with ftp and cron
I have a script (really 2) that ftps a file to another server. If I run the script manually(as a normal user so it isn't permissions,I think) it processes fine. I then put it into cron and it fails. Sometimes I get nothing in my log and sometimes I get 'EPSV': command not understood. Here is my command and the file it executes. command: #!/bin/sh ftp -n < /opt/mace/ftp_thedb.sh file (ftp_thedb.sh )to execute: open xx.xx.xx.xx quote user ftpuser quote pass ueserpass binary lcd /backup_dir put lits2* quit What am I missing? It's driving me to drink(thank goodness ) But it is a little crazy also. This is moving a file from a z/linux server to a windows box. thanks Mace Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: a question on cron
>>> On Fri, May 2, 2008 at 10:12 AM, in message <[EMAIL PROTECTED]>, LJ Mace <[EMAIL PROTECTED]> wrote: > I have a task which must run every other wednesday. > I've looked through the cron info and found that I can > use a 3/2 for my last entry to tell cron to run the > task every other wednesday. > My question is will cron start the task this coming > week(5/7) or will it start the task (5/14) which is > when I need it to start and go on from there. > The entry looks like this: > 45 18 * * 3/2 My guess is that it will run on May 7th, since it is the 19th Wednesday of the year, and the /2 would cause it to run on the 1st, 3rd, 5th, etc. Wednesdays. Note that if I'm right, this means in months with 5 Wednesdays, it will be run 3 times, not just the first and third weeks of the month. For example, in July, it will run on the 2nd, 16th, and 30th. Then in August it will run on the 13th and 27th, not the 6th and 20th. If this isn't what you want, you will likely have to create entries for each month, perhaps each week that you want the command run. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: a question on cron
Thanks Mark, I was thinking of putting a day&month in then the 3/2 to see if I can get it to start on a certain date then jump every other wednesday. What do you think? thanks Mace --- Mark Post <[EMAIL PROTECTED]> wrote: > >>> On Fri, May 2, 2008 at 10:12 AM, in message > <[EMAIL PROTECTED]>, LJ > Mace <[EMAIL PROTECTED]> > wrote: > > I have a task which must run every other > wednesday. > > I've looked through the cron info and found that I > can > > use a 3/2 for my last entry to tell cron to run > the > > task every other wednesday. > > My question is will cron start the task this > coming > > week(5/7) or will it start the task (5/14) which > is > > when I need it to start and go on from there. > > The entry looks like this: > > 45 18 * * 3/2 > > My guess is that it will run on May 7th, since it is > the 19th Wednesday of the year, and the /2 would > cause it to run on the 1st, 3rd, 5th, etc. > Wednesdays. Note that if I'm right, this means in > months with 5 Wednesdays, it will be run 3 times, > not just the first and third weeks of the month. > For example, in July, it will run on the 2nd, 16th, > and 30th. Then in August it will run on the 13th > and 27th, not the 6th and 20th. If this isn't what > you want, you will likely have to create entries for > each month, perhaps each week that you want the > command run. > > > Mark Post > > -- > For LINUX-390 subscribe / signoff / archive access > instructions, > send email to [EMAIL PROTECTED] with the > message: INFO LINUX-390 or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Cron script redirect causing truncation
I have a script which outputs top data periodically to a file using stdout top -c -C -b -d1 -n1 >> /kb/data/top/topout.$sname.txt When I run this by hand, the data in the topout file has the complete path to the running processes. When I run it via cron, everything gets truncated at 80 chars. I know this is probably some session environment variable but I can't seem to come up with the right answer in my googling... Thanks in advance! --- Jeremy Warren Sr. Systems Programmer KB Toy Stores mailto:[EMAIL PROTECTED]@kbtoys.com
Re: Cron sending e-mail
Try something like this: 10 * * * * root /usr/sbin/ntpdate -u condor > /tmp/Log 2>&1 -Original Message- From: James Melin [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 10:35 AM To: [EMAIL PROTECTED] Subject: Cron sending e-mail I have this entry in /etc/crontab 10 * * * * root /usr/sbin/ntpdate -u condor I am getting e-mails every hour that this ran. How do I suppress e-mails to root about this?
Re: Cron sending e-mail
On Tue, 24 Jun 2003, James Melin wrote: > I have this entry in /etc/crontab > > 10 * * * * root /usr/sbin/ntpdate -u condor > > > I am getting e-mails every hour that this ran. How do I suppress e-mails to > root about this? 10 * * * * root /usr/sbin/ntpdate -u condor -s Read the documentation!! -- Cheers John. Join the "Linux Support by Small Businesses" list at http://mail.computerdatasafe.com.au/mailman/listinfo/lssb
Re: Cron sending e-mail
On Tue, 24 Jun 2003, Fargusson.Alan wrote: > Try something like this: > 10 * * * * root /usr/sbin/ntpdate -u condor > /tmp/Log 2>&1 No. 1. Logs in linux belong in /var/log 2. Each run clobbers the previous report. 3. Nobody will look at it. I'm not entirely happy with my suggestion on the last count, but logwatch is likely to notice it. > > -Original Message- > From: James Melin [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 24, 2003 10:35 AM > To: [EMAIL PROTECTED] > Subject: Cron sending e-mail > > > I have this entry in /etc/crontab > > 10 * * * * root /usr/sbin/ntpdate -u condor > > > I am getting e-mails every hour that this ran. How do I suppress e-mails to > root about this? > -- Cheers John. Join the "Linux Support by Small Businesses" list at http://mail.computerdatasafe.com.au/mailman/listinfo/lssb
Re: Cron sending e-mail
10 * * * * root /usr/sbin/ntpdate -u condor >/dev/null 2>&1 > -Original Message- > From: James Melin [SMTP:[EMAIL PROTECTED] > Sent: Tuesday, June 24, 2003 12:35 PM > To: [EMAIL PROTECTED] > Subject: Cron sending e-mail > > I have this entry in /etc/crontab > > 10 * * * * root /usr/sbin/ntpdate -u condor > > > I am getting e-mails every hour that this ran. How do I suppress e-mails > to > root about this?
Re: Cron sending e-mail
My 2 cents MAILTO="" 10 * * * * root /usr/sbin/ntpdate -u condor WBR, Sergey "McKown, John" <[EMAIL PROTECTED]> Sent by: Linux on 390 Port <[EMAIL PROTECTED]> 25.06.2003 02:36 Please respond to Linux on 390 Port To: [EMAIL PROTECTED] cc: Subject:Re: Cron sending e-mail 10 * * * * root /usr/sbin/ntpdate -u condor >/dev/null 2>&1 > -Original Message- > From: James Melin [SMTP:[EMAIL PROTECTED] > Sent: Tuesday, June 24, 2003 12:35 PM > To: [EMAIL PROTECTED] > Subject: Cron sending e-mail > > I have this entry in /etc/crontab > > 10 * * * * root /usr/sbin/ntpdate -u condor > > > I am getting e-mails every hour that this ran. How do I suppress e-mails > to > root about this?
Re: Cron sending e-mail
On Wed, 25 Jun 2003, Sergey Korzhevsky wrote: > My 2 cents > > MAILTO="" > 10 * * * * root /usr/sbin/ntpdate -u condor If that works, and the netpdate fails, there's no evidence to help resolve the problems. i _hate_ it when an author goes to the trouble of providing sensible messages, and some dopey administrator (not offence intended, Sergey) sends them to /dev/null. I have in mind in particular postgresql (on Red Hat Linux), but I think there are other examples in /etc/init.d. -- Cheers John. Join the "Linux Support by Small Businesses" list at http://mail.computerdatasafe.com.au/mailman/listinfo/lssb
Re: Cron sending e-mail
It was the answer on "I am getting e-mails every hour that this ran. How do I suppress e-mails to root about this?" Nothing more. Actually, I had to write MAILTO="some_another_user" Is this better? :) WBR, Sergey John Summerfield <[EMAIL PROTECTED]> Sent by: Linux on 390 Port <[EMAIL PROTECTED]> 25.06.2003 10:44 Please respond to Linux on 390 Port To: [EMAIL PROTECTED] cc: Subject:Re: Cron sending e-mail On Wed, 25 Jun 2003, Sergey Korzhevsky wrote: > My 2 cents > > MAILTO="" > 10 * * * * root /usr/sbin/ntpdate -u condor If that works, and the netpdate fails, there's no evidence to help resolve the problems. i _hate_ it when an author goes to the trouble of providing sensible messages, and some dopey administrator (not offence intended, Sergey) sends them to /dev/null. I have in mind in particular postgresql (on Red Hat Linux), but I think there are other examples in /etc/init.d. -- Cheers John. Join the "Linux Support by Small Businesses" list at http://mail.computerdatasafe.com.au/mailman/listinfo/lssb
Re: Cron sending e-mail
On Wed, 25 Jun 2003, Sergey Korzhevsky wrote: > It was the answer on > > "I am getting e-mails every hour that this ran. How do I suppress e-mails > to > root about this?" > > Nothing more. > > Actually, I had to write > > MAILTO="some_another_user" > > > Is this better? :) I provided my answer a few hours ago. Yours results in email going somewhere, mine results in no email at all. Instead, it goes to the standard log file(s), determined by syslogd's configuration. -- Cheers John. Join the "Linux Support by Small Businesses" list at http://mail.computerdatasafe.com.au/mailman/listinfo/lssb
Re: Cron sending e-mail
On Wed, Jun 25, 2003 at 02:55:56AM +0800, John Summerfield wrote: > On Tue, 24 Jun 2003, Fargusson.Alan wrote: > > > Try something like this: > > 10 * * * * root /usr/sbin/ntpdate -u condor > /tmp/Log 2>&1 > > No. > 1. Logs in linux belong in /var/log > 2. Each run clobbers the previous report. > 3. Nobody will look at it. 4. Allows users to clobber arbitrary files as root via a symlink attack -- - mdz
CRON not running for specific user
Hello, Oracle schedules jobs via CRON. Looks like user was editing his CRON with using "crontab -e". Had some messages showing cron was locked. See below. Restarted CRON, stopped/started CRON no improvement. I tried to schedule a simple CRON as oracle, does not run, no mail message. CRON works Ok for root. Errors when CRON stopped for oracle: Jun 3 03:01:01 anacron[20959]: Anacron started on 2014-06-03 Jun 3 03:01:01 anacron[20959]: Job `cron.daily' locked by another anacron - skipping Jun 3 03:01:01 anacron[20959]: Job `cron.weekly' locked by another anacron - skipping Jun 3 03:01:01 anacron[20959]: Normal exit (0 jobs run) Simple CRON trying to run for Oracle: 03 20 * * * echo hi > /tmp/oracle.test.cron Thanks Joe Joseph Vitale Technology Services Group Mainframe Operating Systems 95 Christopher Columbus Drive Floor 14 Jersey City, N.J. 07302 Work 201-395-1509 Cell917-903-0102 The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Cron does not restart after reboots
Having a strange occurrence where the service 'cron' fails to startup following normal reboots. Here's some info. chkconfig cron displays 'cron on' mikecc1:/etc/init.d # service cron status Checking for Cron: unused mikecc1:/etc/init.d # service cron start Starting CRON daemon done mikecc1:/etc/init.d # service cron status Checking for Cron: running After reboot: status is back to unused mikecc1:/etc/init.d # chkconfig --list cron cron 0:off 1:off 2:on 3:on 4:off 5:on 6:off When I attempt to chkconfig cron off, I get this: Mikecc1:/etc/init.d # chkconfig cron off insserv: warning: script 'S01ITMAgents3' missing LSB tags insserv: warning: script 'S01dsmc.client' missing LSB tags insserv: warning: script 'ITMAgents1' missing LSB tags insserv: Default-Start undefined, assuming default start runlevel(s) for script `ITMAgents1' insserv: warning: script 'dsmc.client' missing LSB tags insserv: warning: script 'ITMAgents2' missing LSB tags insserv: Default-Start undefined, assuming default start runlevel(s) for script `ITMAgents2' insserv: warning: script 'ITMAgents3' missing LSB tags Not certain if the warnings are causing the cron service to fail on reboot. ANY ideas would be most appreciated. Mike -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www2.marist.edu/htbin/wlvindex?LINUX-390
Re: problem with ftp and cron
This may be way too obvious, but Check the environment variables to be sure your environments are similar. Note that scripts run in cron do not run any sort of profile, so nothing is set up by default; the work to build that environment is left up to you. -- .~.Robert P. Nix Mayo Foundation /V\RO-OE-5-55200 First Street SW /( )\ 507-284-0844 Rochester, MN 55905 ^^-^^ - "In theory, theory and practice are the same, but in practice, theory and practice are different." On 12/10/07 7:26 AM, "LJ Mace" <[EMAIL PROTECTED]> wrote: > I have a script (really 2) that ftps a file to another > server. > If I run the script manually(as a normal user so it > isn't permissions,I think) it processes fine. > I then put it into cron and it fails. Sometimes I get > nothing in my log and sometimes I get 'EPSV': command > not understood. > Here is my command and the file it executes. > command: > > #!/bin/sh > ftp -n < /opt/mace/ftp_thedb.sh > > file (ftp_thedb.sh )to execute: > > open xx.xx.xx.xx > quote user ftpuser > quote pass ueserpass > binary > lcd /backup_dir > put lits2* > quit > > What am I missing? It's driving me to > drink(thank goodness ) > But it is a little crazy also. > This is moving a file from a z/linux server to a > windows box. > thanks > Mace > > > > > __ > __ > Never miss a thing. Make Yahoo your home page. > http://www.yahoo.com/r/hs > > -- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: problem with ftp and cron
Try this.. create a script #!/bin/ksh ftp -n -v -i xxx.xxx.xxx.xxx < To Sent by: Linux LINUX-390@VM.MARIST.EDU on 390 Portcc <[EMAIL PROTECTED] IST.EDU> Subject problem with ftp and cron 12/10/2007 08:26 AM Please respond to Linux on 390 Port <[EMAIL PROTECTED] IST.EDU> I have a script (really 2) that ftps a file to another server. If I run the script manually(as a normal user so it isn't permissions,I think) it processes fine. I then put it into cron and it fails. Sometimes I get nothing in my log and sometimes I get 'EPSV': command not understood. Here is my command and the file it executes. command: #!/bin/sh ftp -n < /opt/mace/ftp_thedb.sh file (ftp_thedb.sh )to execute: open xx.xx.xx.xx quote user ftpuser quote pass ueserpass binary lcd /backup_dir put lits2* quit What am I missing? It's driving me to drink(thank goodness ) But it is a little crazy also. This is moving a file from a z/linux server to a windows box. thanks Mace Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 Visit our website at http://www.nyse.com Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Group, Inc. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: problem with ftp and cron
First I'd like to thank you who helped. Now to be humbled. After redoing the scripts with the one below only 1 of my 3 transfers worked. Humm must be a timeing problem, I'll change the order they are started and wait until the next day and see what happens. Well I just got my 1st pair of glasses(at 54) and when I went in to edit cron I notices something funny. Instead of having 2>&1 I had 2>$1 at a 10 font the 2 signs looked simular. The reason it happened on 2 ftps on 2 different servers is the name transfer were the same so I just cut and pasted the error. Thanks for the help(eating crow) Mace --- Eddie Chen <[EMAIL PROTECTED]> wrote: > Try this.. create a script > >#!/bin/ksh >ftp -n -v -i xxx.xxx.xxx.xxx <user ftpuser userpass >bin >lcd /backup/dir >prompt off >mput list2* > quit > EOF > > > > > > LJ Mace > <[EMAIL PROTECTED] > .com> >To > Sent by: Linux > LINUX-390@VM.MARIST.EDU > on 390 Port >cc > <[EMAIL PROTECTED] > IST.EDU> > Subject >problem with > ftp and cron > > 12/10/2007 > 08:26 AM > > > Please respond to > Linux on 390 Port > <[EMAIL PROTECTED] > IST.EDU> > > > > > > > I have a script (really 2) that ftps a file to > another > server. > If I run the script manually(as a normal user so it > isn't permissions,I think) it processes fine. > I then put it into cron and it fails. Sometimes I > get > nothing in my log and sometimes I get 'EPSV': > command > not understood. > Here is my command and the file it executes. > command: > > #!/bin/sh > ftp -n < /opt/mace/ftp_thedb.sh > > file (ftp_thedb.sh )to execute: > > open xx.xx.xx.xx > quote user ftpuser > quote pass ueserpass > binary > lcd /backup_dir > put lits2* > quit > > What am I missing? It's driving me to > drink(thank goodness ) > But it is a little crazy also. > This is moving a file from a z/linux server to a > windows box. > thanks > Mace > > > > > > > Never miss a thing. Make Yahoo your home page. > http://www.yahoo.com/r/hs > > -- > For LINUX-390 subscribe / signoff / archive access > instructions, > send email to [EMAIL PROTECTED] with the > message: INFO LINUX-390 or > visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > > > > > > Visit our website at http://www.nyse.com > > > > Note: The information contained in this message and > any attachment > to it is privileged, confidential and protected from > disclosure. If the > reader of this message is not the intended > recipient, or an employee > or agent responsible for delivering this message to > the intended > recipient, you are hereby notified that any > dissemination, > distribution or copying of this communication is > strictly prohibited. > If you have received this communication in error, > please notify the > sender immediately by replying to the message, and > please delete > it from your system. Thank you. NYSE Group, Inc. > > -- > For LINUX-390 subscribe / signoff / archive access > instructions, > send email to [EMAIL PROTECTED] with the > message: INFO LINUX-390 or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
FW: Cron run-parts /etc/cron.hourly
Is there a problem at sinenomine.net? Frank Ramaekers | Senior Systems Administrator | CIS Mainframe Services -Original Message- From: (Cron Daemon) [mailto:r...@mflnxclef00.ailife.com] Sent: Thursday, October 26, 2023 9:13 AM To: r...@mflnxclef00.ailife.com Subject: Cron run-parts /etc/cron.hourly /etc/cron.hourly/0yum-hourly.cron: Could not retrieve mirrorlist http://mirrors.sinenomine.net/clefos?releasever=7&arch=s390x&repo=os error was 12: Timeout on http://mirrors.sinenomine.net/clefos?releasever=7&arch=s390x&repo=os: (28, 'Connection timed out after 30001 milliseconds') Could not retrieve mirrorlist http://mirrors.sinenomine.net/clefos?releasever=7&arch=s390x&repo=updates error was 12: Timeout on http://mirrors.sinenomine.net/clefos?releasever=7&arch=s390x&repo=updates: (28, 'Connection timed out after 30001 milliseconds') -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www2.marist.edu/htbin/wlvindex?LINUX-390
Re: Cron run-parts /etc/cron.hourly
Checking Is there a problem at sinenomine.net? -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www2.marist.edu/htbin/wlvindex?LINUX-390
Re: Cron run-parts /etc/cron.hourly
Try it now. Is there a problem at sinenomine.net? -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www2.marist.edu/htbin/wlvindex?LINUX-390
Re: Cron script redirect causing truncation
On Tue, Mar 25, 2003 at 04:15:11PM -0500, Jeremy Warren wrote: > I have a script which outputs top data periodically to a file using stdout > > top -c -C -b -d1 -n1 >> /kb/data/top/topout.$sname.txt What is this command, BTW? not the standard top from procps, right? > > When I run this by hand, the data in the topout file has the complete path > to the running processes. > When I run it via cron, everything gets truncated at 80 chars. I know this > is probably some session environment variable but I can't seem to come up > with the right answer in my googling... COLUMNS ? -- Tzafrir Cohen +---+ http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend| mailto:[EMAIL PROTECTED] +---+
Re: Cron script redirect causing truncation
If I understand your question, yes, it's the standard "top" command that normally you run interactively, the various switches are -c = complete command line instead of just command name. -C = Individual CPU States and Summary CPU info -b = batch mode (So I can dump it to a file) -n1 = Iterations (1) -d1 = delay (needs to be something even though I am only doing 1 iteration) So the desired effect is to have cron wake up every 5 min and dumps a snapshot of the system to a file. I added the line: export COLUMNS=128 to the script just before the top execution. To be sure it was taking affect I added: echo $COLUMNS just after the top line, and it did get set to 128, yet the output file is still truncated at 80 columns. Thanks though... --- Jeremy Warren Sr. Systems Programmer KB Toy Stores mailto:[EMAIL PROTECTED]@kbtoys.com |-+> | | Tzafrir Cohen| | | <[EMAIL PROTECTED]| | | .ac.il> | | | Sent by: Linux on| | | 390 Port | | | <[EMAIL PROTECTED]| | | IST.EDU> | | || | || | | 03/25/2003 03:40 | | | PM | | | Please respond to| | | Linux on 390 Port| | || |-+> >-| | | | To: [EMAIL PROTECTED] | | cc: | | Subject: Re: [LINUX-390] Cron script redirect causing truncation | >-| On Tue, Mar 25, 2003 at 04:15:11PM -0500, Jeremy Warren wrote: > I have a script which outputs top data periodically to a file using stdout > > top -c -C -b -d1 -n1 >> /kb/data/top/topout.$sname.txt What is this command, BTW? not the standard top from procps, right? > > When I run this by hand, the data in the topout file has the complete path > to the running processes. > When I run it via cron, everything gets truncated at 80 chars. I know this > is probably some session environment variable but I can't seem to come up > with the right answer in my googling... COLUMNS ? -- Tzafrir Cohen +---+ http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend| mailto:[EMAIL PROTECTED] +---+
Re: Cron script redirect causing truncation
On Tue, 25 Mar 2003, Jeremy Warren wrote: > I have a script which outputs top data periodically to a file using stdout > > top -c -C -b -d1 -n1 >> /kb/data/top/topout.$sname.txt > > When I run this by hand, the data in the topout file has the complete path > to the running processes. > When I run it via cron, everything gets truncated at 80 chars. I know this > is probably some session environment variable but I can't seem to come up > with the right answer in my googling... Probably, like other software, if figures on a card-width screen if it doesn't get better information. Try setting "COLUMNS=120" in its environment. You might also mention the problem to the author. -- Cheers John. Join the "Linux Support by Small Businesses" list at http://mail.computerdatasafe.com.au/mailman/listinfo/lssb
Re: Cron script redirect causing truncation
Jeremy, I did some testing. This crontab entry works for me: cd ; COLUMNS=200 LINES=200 top -c -C -b -d1 -n1 >> top.list Apparently both the columns and lines need to be specified. Mark Post -Original Message- From: Jeremy Warren [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 4:15 PM To: [EMAIL PROTECTED] Subject: Cron script redirect causing truncation I have a script which outputs top data periodically to a file using stdout top -c -C -b -d1 -n1 >> /kb/data/top/topout.$sname.txt When I run this by hand, the data in the topout file has the complete path to the running processes. When I run it via cron, everything gets truncated at 80 chars. I know this is probably some session environment variable but I can't seem to come up with the right answer in my googling... Thanks in advance! --- Jeremy Warren Sr. Systems Programmer KB Toy Stores mailto:[EMAIL PROTECTED]@kbtoys.com
Re: CRON not running for specific user
Anacron is different then cron.. it's normally invoked by cron once a day .. maybe in /etc/cron.d? It should be the one running the cron.daily and weekly stuff.See /etc/anacrontab .. Anyway - you might see if there are already anacron processes running and kill them: ps -ef | grep anacron Scott Rohling On Mon, Jun 9, 2014 at 5:24 PM, Vitale, Joseph wrote: > Hello, > > Oracle schedules jobs via CRON. Looks like user was editing his CRON > with using "crontab -e". > > Had some messages showing cron was locked. See below. > > Restarted CRON, stopped/started CRON no improvement. I tried to schedule > a simple CRON as oracle, does not run, no mail message. > > CRON works Ok for root. > > Errors when CRON stopped for oracle: > Jun 3 03:01:01 anacron[20959]: Anacron started on 2014-06-03 > Jun 3 03:01:01 anacron[20959]: Job `cron.daily' locked by another > anacron - skipping > Jun 3 03:01:01 anacron[20959]: Job `cron.weekly' locked by another > anacron - skipping > Jun 3 03:01:01 anacron[20959]: Normal exit (0 jobs run) > > Simple CRON trying to run for Oracle: > 03 20 * * * echo hi > /tmp/oracle.test.cron > > > Thanks > Joe > > Joseph Vitale > Technology Services Group > Mainframe Operating Systems > 95 Christopher Columbus Drive > Floor 14 > Jersey City, N.J. 07302 > Work 201-395-1509 > Cell917-903-0102 > > > The information contained in this e-mail, and any attachment, is > confidential and is intended solely for the use of the intended recipient. > Access, copying or re-use of the e-mail or any attachment, or any > information contained therein, by any other person is not authorized. If > you are not the intended recipient please return the e-mail to the sender > and delete it from your computer. Although we attempt to sweep e-mail and > attachments for viruses, we do not guarantee that either are virus-free and > accept no liability for any damage sustained as a result of viruses. > > Please refer to http://disclaimer.bnymellon.com/eu.htm for certain > disclosures relating to European legal entities. > > -- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or > visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > -- > For more information on Linux on System z, visit > http://wiki.linuxvm.org/ > -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For more information on Linux on System z, visit http://wiki.linuxvm.org/
Re: Cron does not restart after reboots
Mike, is systemV chkconfig deprecated in favor of systemD? How about trying: # systemctl enable crond # reboot ... # systemctl status crond -Mike M On Fri, Jul 5, 2019 at 8:54 AM Mike Riggs wrote: > Having a strange occurrence where the service 'cron' fails to startup > following normal reboots. Here's some info. > > chkconfig cron displays 'cron on' > > mikecc1:/etc/init.d # service cron status > Checking for Cron: unused > > mikecc1:/etc/init.d # service cron start > Starting CRON daemon done > > mikecc1:/etc/init.d # service cron status > Checking for Cron: running > > After reboot: status is back to unused > > mikecc1:/etc/init.d # chkconfig --list cron > cron 0:off 1:off 2:on 3:on 4:off 5:on 6:off > > When I attempt to chkconfig cron off, I get this: > > Mikecc1:/etc/init.d # chkconfig cron off > insserv: warning: script 'S01ITMAgents3' missing LSB tags > insserv: warning: script 'S01dsmc.client' missing LSB tags > insserv: warning: script 'ITMAgents1' missing LSB tags > insserv: Default-Start undefined, assuming default start runlevel(s) for > script `ITMAgents1' > insserv: warning: script 'dsmc.client' missing LSB tags > insserv: warning: script 'ITMAgents2' missing LSB tags > insserv: Default-Start undefined, assuming default start runlevel(s) for > script `ITMAgents2' > insserv: warning: script 'ITMAgents3' missing LSB tags > > Not certain if the warnings are causing the cron service to fail on > reboot. > > ANY ideas would be most appreciated. > > Mike > > -- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or > visit > http://www2.marist.edu/htbin/wlvindex?LINUX-390 > -- -Mike MacIsaac -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www2.marist.edu/htbin/wlvindex?LINUX-390
cron jobs run twice when when time changes
Hi, I have the following crontab file on my SLES10 SP2 systems: SHELL=/bin/sh PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin MAILTO=root # # check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly # -*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 10 0 * * * root rm -f /var/spool/cron/lastrun/cron.daily 29 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 44 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly This Sunday, when we move the time back one hour, the scripts in our daily group ran twice. This is caused by the run-crons script that runs every 15 minutes. In our case, the daily script ran at 12:10AM on 11/1, then again at 11:10PM on 11/1, and finally at 12:10AM on 11/2. Searching online, I see various bugs in run-crons causing this type of behavior on other distributions. Did anyone else see this behavior over the weekend? Thanks, Aria -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: cron jobs run twice when when time changes
Aria Bamdad wrote: Hi, I have the following crontab file on my SLES10 SP2 systems: SHELL=/bin/sh PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin MAILTO=root # # check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly # -*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 10 0 * * * root rm -f /var/spool/cron/lastrun/cron.daily 29 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 44 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly This Sunday, when we move the time back one hour, the scripts in our daily group ran twice. This is caused by the run-crons script that runs every 15 minutes. In our case, the daily script ran at 12:10AM on 11/1, then again at 11:10PM on 11/1, and finally at 12:10AM on 11/2. Searching online, I see various bugs in run-crons causing this type of behavior on other distributions. Did anyone else see this behavior over the weekend? I'm sure they did, it's the obvious behaviour and, without documentation to the contrary, it's what I would expect. If you can avoid running cron jobs at the times affected by daylight savings changeovers, that would help. Otherwise, crond needs to be taught how to use UTC instead of local time. On the basis that current behaviour might be depended on by someone (don't ask me why!), the choice of time might be configurable, and conceivably, people might want crond to use some time that is neither local nor UTC, and maybe for individual cron jobs. This last point applies to me, I want to regularly check a website when trading is active, and it operates in another time zone. I I could say, in my crontab, TZ=Australia/Sydney then I could track its trading hours more easily. -- Cheers John -- spambait 1...@coco.merseine.nu z1...@coco.merseine.nu -- Advice http://webfoot.com/advice/email.top.php http://www.catb.org/~esr/faqs/smart-questions.html http://support.microsoft.com/kb/555375 You cannot reply off-list:-) -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Running a bash script that does shutdown from cron
I have a bash script called update that does up2date followed by a shutdown. The intent is to be able to update the kernel in the middle of the night when there is no activity on this penguin (obviously RedHat) and the users won't be impacted. #!/bin/bash up2date --update shutdown -r now If I do update from a terminal everything proceeds as expected but if I schedule update thru cron the up2date works but the shutdown never happens. Is there a restriction on the shutdown command? What might be the problem? I put the entry in root's crontab. -- Bill Dodge email: [EMAIL PROTECTED] Phone: (703)627-2455 "If you don't know where you are going, any road will take you there." Lewis Carroll "If you don't know where you are, a map won't help" Unknown -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Running a bash script that does shutdown from cron
The PATH that cron uses probably does not include /sbin. You could try using /sbin/shutdown... in the shell script. -Original Message- From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of Bill Dodge Sent: Tuesday, May 13, 2008 11:23 AM To: LINUX-390@VM.MARIST.EDU Subject: Running a bash script that does shutdown from cron I have a bash script called update that does up2date followed by a shutdown. The intent is to be able to update the kernel in the middle of the night when there is no activity on this penguin (obviously RedHat) and the users won't be impacted. #!/bin/bash up2date --update shutdown -r now If I do update from a terminal everything proceeds as expected but if I schedule update thru cron the up2date works but the shutdown never happens. Is there a restriction on the shutdown command? What might be the problem? I put the entry in root's crontab. -- Bill Dodge email: [EMAIL PROTECTED] Phone: (703)627-2455 "If you don't know where you are going, any road will take you there." Lewis Carroll "If you don't know where you are, a map won't help" Unknown -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 __ CONFIDENTIALITY NOTICE: This email from the State of California is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized review or use, including disclosure or distribution, is prohibited. If you are not the intended recipient, please contact the sender and destroy all copies of this email.
Re: Running a bash script that does shutdown from cron
On Tuesday 13 May 2008 14:22, Bill Dodge wrote: >I have a bash script called update that does up2date followed by a shutdown. > The intent is to be able to update the kernel in the middle of the night > when there is no activity on this penguin (obviously RedHat) and the users > won't be impacted. > >#!/bin/bash >up2date --update >shutdown -r now > >If I do update from a terminal everything proceeds as expected but if I > schedule update thru cron the up2date works but the shutdown never happens. > Is there a restriction on the shutdown command? What might be the > problem? I put the entry in root's crontab. -- The environment set up by cron is very different from that set up by a login shell. See crontab(5) for details. It is possible that shutdown depends on something in your login environment to work, but I'm not sure what that would be. Perhaps the PATH? I would recommend either setting the PATH in the shell script, or explicitly giving absolute pathnames for the commands you invoke. Also, you probably want it to only do the shutdown if the up2date command succeeds. If so, try: /usr/sbin/up2date --update && /sbin/shutdown -r now in your script. - MacK. - Edmund R. MacKenty Software Architect Rocket Software, Inc. Newton, MA USA -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Running a bash script that does shutdown from cron
Fargusson.Alan wrote: The PATH that cron uses probably does not include /sbin. You could try using /sbin/shutdown... in the shell script. or set PATH yourself in the crontab. -- Cheers John -- spambait [EMAIL PROTECTED] [EMAIL PROTECTED] -- Advice http://webfoot.com/advice/email.top.php http://www.catb.org/~esr/faqs/smart-questions.html http://support.microsoft.com/kb/555375 You cannot reply off-list:-) -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Running a bash script that does shutdown from cron
Thanks John. I actually figured this out late yesterday. The command I need is reboot which can be executed from a cron invoked script (it's also in /sbin). Linux on 390 Port wrote: > > Fargusson.Alan wrote: > > The PATH that cron uses probably does not include /sbin. You could try > > using /sbin/shutdown... in the shell script. > or set PATH yourself in the crontab. > > > > > -- > > Cheers > John > > -- spambait > [EMAIL PROTECTED] [EMAIL PROTECTED] > -- Advice > http://webfoot.com/advice/email.top.php > http://www.catb.org/~esr/faqs/smart-questions.html > http://support.microsoft.com/kb/555375 > > You cannot reply off-list:-) > > -- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > -- Bill Dodge email: [EMAIL PROTECTED] Phone: (703)627-2455 "If you don't know where you are going, any road will take you there." Lewis Carroll "If you don't know where you are, a map won't help" Unknown -- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390