init(8) not executing everything cron, getty on some hosts

2013-10-07 Thread Julian Fagir
Hi, I've been experiencing a strange problem with one of my hosts (I think, since upgrading to 9.1-RELEASE). The host does not start several services after booting, especially no getty(8)s and no cron(8). When starting these services manually, it does so without flaw (you can login via ssh). I

Re: init(8) not executing everything cron, getty on some hosts

2013-10-07 Thread Julian Fagir
Hi, On Mon, 7 Oct 2013 10:47:09 +0200 Julian Fagir wrote: I don't think it's a hardware issue, as one of the three machines runs on different hardware than the other two (which are identical). I have to update on that: The two servers with the identical hardware are the ones with the real

test if script called by cron

2013-09-16 Thread Paul Macdonald
Hi, Is there a simple way of testing whether a given script was called via cron, I'd rather find a solution that would work from within the script rather than setting an environment variable in the crontab. thanks Paul. (anyone here going to EuroBSD con?) -- - Paul

Re: test if script called by cron

2013-09-16 Thread Polytropon
On Mon, 16 Sep 2013 12:26:59 +0100, Paul Macdonald wrote: Is there a simple way of testing whether a given script was called via cron, I'd rather find a solution that would work from within the script rather than setting an environment variable in the crontab. I'd suggest the script creates

Re: test if script called by cron

2013-09-16 Thread Dan Nelson
In the last episode (Sep 16), Paul Macdonald said: Is there a simple way of testing whether a given script was called via cron, I'd rather find a solution that would work from within the script rather than setting an environment variable in the crontab. You check to see if stdin

Re: test if script called by cron

2013-09-16 Thread Jerry
On Mon, 16 Sep 2013 12:26:59 +0100 Paul Macdonald articulated: Hi, Is there a simple way of testing whether a given script was called via cron, I'd rather find a solution that would work from within the script rather than setting an environment variable in the crontab. thanks Paul

Re: test if script called by cron

2013-09-16 Thread Polytropon
On Mon, 16 Sep 2013 23:28:17 -0400, kpn...@pobox.com wrote: On Mon, Sep 16, 2013 at 02:05:04PM +0200, Polytropon wrote: On Mon, 16 Sep 2013 12:26:59 +0100, Paul Macdonald wrote: Is there a simple way of testing whether a given script was called via cron, I'd rather find a solution

cron pile up! libnss-mysql and cron (Rehash)

2012-06-22 Thread Rudy
-in replacement for MySQL ps axlw | grep cron 0 56084 1 0 20 0 31064 2844 nanslp IsJ ?? 0:00.78 /usr/sbin/cron -s 0 68402 56084 0 20 0 31064 2844 ppwait DJ ?? 0:00.00 cron: running job (cron) 0 68403 68402 0 20 0 31064 2844 so_rcv_s IVsJ ?? 0:00.00 cron

cron pile up! Lot's of cron: running job (cron)

2012-06-22 Thread Rudy
http://lists.freebsd.org/pipermail/freebsd-questions/2007-December/164174.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to

Re: Newbie question: Why aren't my cron jobs running?

2012-06-13 Thread Walter Hurry
On Tue, 12 Jun 2012 12:21:31 -0500, Dan Lists wrote: The syntax of his crontab file is correct. Vixie cron does care about leading spaces, tabs, extra spaces, or leading zeros. Earlier versions of cron are much pickier about the crontab file. The cron logs show that it is starting his

Re: Newbie question: Why aren't my cron jobs running?

2012-06-13 Thread Chris
On 6/13/2012 6:23 PM, Walter Hurry wrote: On Tue, 12 Jun 2012 12:21:31 -0500, Dan Lists wrote: The syntax of his crontab file is correct. Vixie cron does care about leading spaces, tabs, extra spaces, or leading zeros. Earlier versions of cron are much pickier about the crontab file

Re: Newbie question: Why aren't my cron jobs running?

2012-06-12 Thread Ramiro Caso
On 11/06/2012 23:10, Michael Sierchio wrote: On Mon, Jun 11, 2012 at 7:04 PM, Walter Hurry walterhu...@gmail.com wrote: As the subject says, this is probably a newbie question (I am new to FreeBSD but quite experienced at Linux). FreeBSD9 on x86_64. Cron is running: $ ps -ax|grep cron

Re: Newbie question: Why aren't my cron jobs running?

2012-06-12 Thread Mark Felder
On Tue, 12 Jun 2012 00:06:21 -0500, Robert Bonomi bon...@mail.r-bonomi.com wrote: Comment: using a leading zero on the numeric fields is a BAD IDEA(tm) -- you are *strongly* encocuraged to remove them. Yes, that means numbers will not be column aligned, but it is a small price to pay to

Re: Newbie question: Why aren't my cron jobs running?

2012-06-12 Thread Lowell Gilbert
Mark Felder f...@feld.me writes: On Tue, 12 Jun 2012 00:06:21 -0500, Robert Bonomi bon...@mail.r-bonomi.com wrote: Comment: using a leading zero on the numeric fields is a BAD IDEA(tm) -- you are *strongly* encocuraged to remove them. Yes, that means numbers will not be column aligned,

Re: Newbie question: Why aren't my cron jobs running?

2012-06-12 Thread Mark Felder
On Tue, 12 Jun 2012 09:36:37 -0500, Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org wrote: I don't have ready access to source at the moment, but I would expect (like the normal C I/O functions) it will be interpreted as octal. Suppose we could always ask Paul Vixie :-)

Re: Newbie question: Why aren't my cron jobs running?

2012-06-12 Thread Polytropon
On Tue, 12 Jun 2012 08:29:02 -0500, Mark Felder wrote: On Tue, 12 Jun 2012 00:06:21 -0500, Robert Bonomi bon...@mail.r-bonomi.com wrote: Comment: using a leading zero on the numeric fields is a BAD IDEA(tm) -- you are *strongly* encocuraged to remove them. Yes, that means numbers

Re: Newbie question: Why aren't my cron jobs running?

2012-06-12 Thread Dan Lists
in crontabs, so they cannot be used everywhere to align data columns. The syntax of his crontab file is correct. Vixie cron does care about leading spaces, tabs, extra spaces, or leading zeros. Earlier versions of cron are much pickier about the crontab file. The cron logs show

Newbie question: Why aren't my cron jobs running?

2012-06-11 Thread Walter Hurry
As the subject says, this is probably a newbie question (I am new to FreeBSD but quite experienced at Linux). FreeBSD9 on x86_64. Cron is running: $ ps -ax|grep cron 1513 ?? Is 0:00.01 /usr/sbin/cron -s 2283 0 S+ 0:00.00 grep cron $ I have a syntactically valid crontab

Re: Newbie question: Why aren't my cron jobs running?

2012-06-11 Thread Michael Sierchio
On Mon, Jun 11, 2012 at 7:04 PM, Walter Hurry walterhu...@gmail.com wrote: As the subject says, this is probably a newbie question (I am new to FreeBSD but quite experienced at Linux). FreeBSD9 on x86_64. Cron is running: $ ps -ax|grep cron  1513  ??  Is     0:00.01 /usr/sbin/cron -s

Re: Newbie question: Why aren't my cron jobs running?

2012-06-11 Thread Walter Hurry
On Mon, 11 Jun 2012 19:10:21 -0700, Michael Sierchio wrote: Have you installed bash? It's not in the system base. What's in your shell scripts? Thanks for the quick response. $ pkg_info|grep bash bash-4.2.28 The GNU Project's Bourne Again SHell $ which bash /bin/bash $ $ less

Re: Newbie question: Why aren't my cron jobs running?

2012-06-11 Thread Michael Sierchio
On Mon, Jun 11, 2012 at 7:25 PM, Walter Hurry walterhu...@gmail.com wrote: cat /etc/shells ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to

Re: Newbie question: Why aren't my cron jobs running?

2012-06-11 Thread Walter Hurry
On Mon, 11 Jun 2012 21:21:12 -0500, Adam Vande More wrote: You really have bash in /bin ? Are your scripts executable? What does /var/log/cron say? $ file /bin/bash /bin/bash: symbolic link to `/usr/local/bin/bash' $ sudo tail -50 /var/log/cron (result snipped at 02:22:00 for brevity) Jun

Re: Newbie question: Why aren't my cron jobs running?

2012-06-11 Thread Walter Hurry
On Mon, 11 Jun 2012 19:36:28 -0700, Michael Sierchio wrote: cat /etc/shells $ cat /etc/shells # $FreeBSD: release/9.0.0/etc/shells 59717 2000-04-27 21:58:46Z ache $ # # List of acceptable shells for chpass(1). # Ftpd will not allow users to connect who are not using # one of these shells.

Re: Newbie question: Why aren't my cron jobs running?

2012-06-11 Thread Chris
On 6/11/2012 9:25 PM, Walter Hurry wrote: On Mon, 11 Jun 2012 19:10:21 -0700, Michael Sierchio wrote: Have you installed bash? It's not in the system base. What's in your shell scripts? Thanks for the quick response. $ pkg_info|grep bash bash-4.2.28 The GNU Project's Bourne

Re: Newbie question: Why aren't my cron jobs running?

2012-06-11 Thread Robert Bonomi
Walter Hurry walterhu...@gmail.com wrote: As the subject says, this is probably a newbie question (I am new to FreeBSD but quite experienced at Linux). FreeBSD9 on x86_64. Cron is running: $ ps -ax|grep cron 1513 ?? Is 0:00.01 /usr/sbin/cron -s 2283 0 S+ 0:00.00 grep

Cron Problems

2012-04-23 Thread Tim Gustafson
I've recently installed a FreeBSD 9.0 jail server, and inside each of my jails I am getting the following errors in my log about every 5 minutes: cron[7635]: NSSWITCH(_nsdispatch): ldap, group, setgrent, not found, and no fallback provided cron[7635]: NSSWITCH(_nsdispatch): ldap, group

Re: Probably working too hard for this cron question

2011-06-14 Thread Warren Block
On Mon, 13 Jun 2011, Kurt Buff wrote: Per the handbook, I added SHELL=/bin/sh to crontab, and I also added #!/bin/sh as the first line in the script Should not need both. The first changes a default, which is bad when you switch to another system where that hasn't been changed.

Probably working too hard for this cron question

2011-06-13 Thread Kurt Buff
/date stamp at the end of the file. It works if I run it manually, but not from cron. Here are the batchfile and the cron entry: --begin script-- dt=`/bin/date +%Y-%m-%d` /bin/date /root/$dt-external1.txt /usr/local/bin/curl -K /root/urls.txt /root/$dt-external1.txt /bin/date

Re: Probably working too hard for this cron question

2011-06-13 Thread pete wright
with the date in the variable, do a bunch of cURL stuff, then append a time/date stamp at the end of the file. It works if I run it manually, but not from cron. Here are the batchfile and the cron entry: --begin script-- dt=`/bin/date +%Y-%m-%d` /bin/date /root/$dt-external1

RE: Probably working too hard for this cron question

2011-06-13 Thread Gary Gatten
] On Behalf Of pete wright Sent: Monday, June 13, 2011 3:25 PM To: Kurt Buff Cc: FreeBSD Questions Subject: Re: Probably working too hard for this cron question On Mon, Jun 13, 2011 at 12:52 PM, Kurt Buff kurt.b...@gmail.com wrote: All, I've googled a bunch, read some freebsd.org docs, and just can't

Re: Probably working too hard for this cron question

2011-06-13 Thread pete wright
On Mon, Jun 13, 2011 at 2:14 PM, Gary Gatten ggat...@waddell.com wrote: Yeah Pete, kinda need that huh.  Kurt, If that turns out to be the only issue, don't feel bad - I've forgotten it myself several times!  I'm sure many others have as well! as someone who was fixing some brain dead cron

Re: Probably working too hard for this cron question

2011-06-13 Thread Kurt Buff
into a variable, append the time/date stamp at the beginning of the file created with the date in the variable, do a bunch of cURL stuff, then append a time/date stamp at the end of the file. It works if I run it manually, but not from cron. Here are the batchfile and the cron entry: --begin

Re: Probably working too hard for this cron question

2011-06-13 Thread Kurt Buff
for this cron question On Mon, Jun 13, 2011 at 12:52 PM, Kurt Buff kurt.b...@gmail.com wrote: All, I've googled a bunch, read some freebsd.org docs, and just can't figure this out. I have a script that should read the current date into a variable, append the time/date stamp

Fetching distfiles via cron does not download...

2010-11-02 Thread Leslie Jensen
Hello list. I have the following in /etc/crontab @reboot root portsnap -I cron update /root/bin/cv_portsnap_cron pkg_version -vIL= The script /root/bin/cv_portsnap_cron #!/bin/sh portmaster --clean-distfiles-all portmaster -aF Message received from cron: === Gathering distinfo

Re: Fetching distfiles via cron does not download...

2010-11-02 Thread Lystic Emsen
On Tue, Nov 2, 2010 at 4:08 AM, Leslie Jensen les...@eskk.nu wrote: Hello list. I have the following in /etc/crontab @reboot root portsnap -I cron update /root/bin/cv_portsnap_cron pkg_version -vIL= I don't see where you are doing a portsnap fetch first. If you haven't done a fetch

Re: Fetching distfiles via cron does not download...

2010-11-02 Thread Leslie Jensen
Lystic Emsen skrev 2010-11-02 11:53: On Tue, Nov 2, 2010 at 4:08 AM, Leslie Jensenles...@eskk.nu wrote: Hello list. I have the following in /etc/crontab @reboot root portsnap -I cron update /root/bin/cv_portsnap_cron pkg_version -vIL= I don't see where you are doing a portsnap fetch

Re: Fetching distfiles via cron does not download...

2010-11-02 Thread Lystic Emsen
On Tue, Nov 2, 2010 at 5:57 AM, Leslie Jensen les...@eskk.nu wrote: Lystic Emsen skrev 2010-11-02 11:53: On Tue, Nov 2, 2010 at 4:08 AM, Leslie Jensenles...@eskk.nu wrote: Hello list. I have the following in /etc/crontab @reboot root portsnap -I cron update /root/bin

Re: Fetching distfiles via cron does not download...

2010-11-02 Thread Leslie Jensen
Lystic Emsen skrev 2010-11-02 12:44: According to the handbook this command is supposed to do that. portsnap -I cron update Yeah, you are right, I missed that. However, the problem is that you didn't specify the full path to portsnap. That will cause it to fail and the operator won't

Re: 8.1: Cron ignoring crontab updates

2010-09-04 Thread perryh
Arthur Chance free...@qeng-ho.org wrote: On 09/03/10 09:19, per...@pluto.rain.com wrote: Chris Reesutis...@gmail.com wrote: You have to SIGHUP cron, not restart it. # killall -HUP cron Isn't crontab(1) supposed to do that, without separate intervention? From man cron

Re: 8.1: Cron ignoring crontab updates

2010-09-03 Thread perryh
Chris Rees utis...@gmail.com wrote: You have to SIGHUP cron, not restart it. # killall -HUP cron Isn't crontab(1) supposed to do that, without separate intervention? On 2 Sep 2010 21:11, patrick gibblert...@gmail.com wrote: I recently upgraded a FreeBSD 7.0 system to 8.1-RELEASE (via

Re: 8.1: Cron ignoring crontab updates

2010-09-03 Thread Arthur Chance
On 09/03/10 09:19, per...@pluto.rain.com wrote: Chris Reesutis...@gmail.com wrote: You have to SIGHUP cron, not restart it. # killall -HUP cron Isn't crontab(1) supposed to do that, without separate intervention? From man cron Additionally, cron checks each minute to see if its

Re: 8.1: Cron ignoring crontab updates

2010-09-03 Thread patrick
Yes, it's definitely updating: [r...@juno /var/cron/tabs]# ls -ald /var/cron/tabs drwx-- 2 root wheel 512 Sep 2 12:49 /var/cron/tabs And after editing my crontab: [r...@juno /var/cron/tabs]# ls -ald /var/cron/tabs drwx-- 2 root wheel 512 Sep 3 10:25 /var/cron/tabs I've been

Re: 8.1: Cron ignoring crontab updates

2010-09-02 Thread Chris Rees
You have to SIGHUP cron, not restart it. # killall -HUP cron Chris Sorry for top-posting, Android won't let me quote, but K-9 can't yet do threading. On 2 Sep 2010 21:11, patrick gibblert...@gmail.com wrote: I recently upgraded a FreeBSD 7.0 system to 8.1-RELEASE (via freebsd-update

Re: Cron problems

2010-08-28 Thread Thomas Keusch
On Sat, Aug 28, 2010 at 01:49:18PM +0200, Bernt Hansson wrote: Hell Bernt, I'm having problems with lines like this in cron, works on the command line, but not in cron. /sbin/dump -0uan -f - /usr | gzip -2 | ssh -c blowfish \ targetu...@targetmachine.example.com dd of=/mybigfiles/dump

Simulate CRON

2010-06-14 Thread Carmel
I saw a posting here months ago regarding a way to simulate running a script under CRON. I wrote it down and now cannot find it. Googling has not proved very useful either. I just cannot remember the program name. I hope I am explaining this sanely enough. -- Carmel ✌ carmel...@hotmail.com

Re: Simulate CRON

2010-06-14 Thread Amitabh Kant
On Mon, Jun 14, 2010 at 3:42 PM, Carmel carmel...@hotmail.com wrote: I saw a posting here months ago regarding a way to simulate running a script under CRON. I wrote it down and now cannot find it. Googling has not proved very useful either. I just cannot remember the program name. I hope I

Re: Simulate CRON

2010-06-14 Thread Carmel
On Mon, 14 Jun 2010 16:41:19 +0530 Amitabh Kant amitabhk...@gmail.com articulated: On Mon, Jun 14, 2010 at 3:42 PM, Carmel carmel...@hotmail.com wrote: I saw a posting here months ago regarding a way to simulate running a script under CRON. I wrote it down and now cannot find

Re: Simulate CRON

2010-06-14 Thread Robert Huff
Carmel writes: I saw a posting here months ago regarding a way to simulate running a script under CRON. I wrote it down and now cannot find it. Googling has not proved very useful either. I just cannot remember the program name. Are you looking for a cron syntax check? If yes

Re: Simulate CRON

2010-06-14 Thread C. P. Ghost
On Mon, Jun 14, 2010 at 1:39 PM, Carmel carmel...@hotmail.com wrote: No, sorry. There was a command or program, I forgot which, that would allow a user to run a program under another environment, similar to the environment that a script under CRON would be running under. at(1) maybe? -cpghost

Re: Simulate CRON

2010-06-14 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/06/2010 12:55:34, Robert Huff wrote: Carmel writes: I saw a posting here months ago regarding a way to simulate running a script under CRON. I wrote it down and now cannot find it. Googling has not proved very useful either. I

Re: Simulate CRON

2010-06-14 Thread Jonathan McKeown
On Monday 14 June 2010 13:39:15 Carmel wrote: On Mon, 14 Jun 2010 16:41:19 +0530 Amitabh Kant amitabhk...@gmail.com articulated: On Mon, Jun 14, 2010 at 3:42 PM, Carmel carmel...@hotmail.com wrote: I saw a posting here months ago regarding a way to simulate running a script under CRON

Re: Simulate CRON

2010-06-14 Thread Carmel
On Mon, 14 Jun 2010 07:55:34 -0400 Robert Huff roberth...@rcn.com articulated: Are you possibly talking about a jail? Sorry, no. I am going to try searching the questions archives and perhaps come up with it. -- Carmel ✌ carmel...@hotmail.com |=== |=== |===

Re: cron not sending emails (SOLVED)

2010-06-10 Thread Carlos Fernando Assis Paniago
I Had a terrible week with freebsd. In monday I did an upgrade from 7.3 to 8.1-prerelease in 3 machines, 2 of them worked normaly and one stop functioning, and without user (ldap) e cron is not sending emails. The log for cron is: Jun 10 19:45:00 sol /usr/sbin/cron[80892]: (root) CMD (/usr

Re: cron not sending emails

2010-06-01 Thread Laszlo Nagy
Cron is still not sending emails. Any idea? Is there any output in the 'maillog' log? May 14 10:53:00 server postfix/sendmail[2958]: fatal: user(1001): No recipient addresses found in message header ___ freebsd-questions@freebsd.org

Re: cron not sending emails

2010-06-01 Thread Laszlo Nagy
It doesn't work. With, or without the MAILTO. Just for completeness, I have used this: MAILTO=gandalf The gandalf user is a local user on the system. I can send local mail to this user using the sendmail postfix program (checked twice). Cron is still not sending emails. Any idea

Re: cron not sending emails

2010-06-01 Thread APseudoUtopia
2010/5/28 Laszlo Nagy gand...@shopzeus.com: Hi All! After upgrading to 8.0 RELEASE, I'm not getting any emails from cron. If I put this into root's crontab * * * * * echo TEST then I see this in the maillog: May 14 10:53:00 server postfix/sendmail[2958]: fatal: user(1001): No recipient

Re: cron not sending emails

2010-06-01 Thread Matthias Apitz
El día Tuesday, June 01, 2010 a las 09:41:11AM -0400, APseudoUtopia escribió: 2010/5/28 Laszlo Nagy gand...@shopzeus.com: Hi All! After upgrading to 8.0 RELEASE, I'm not getting any emails from cron. If I put this into root's crontab * * * * * echo TEST then I see

Re: cron not sending emails

2010-05-30 Thread Laszlo Nagy
to this user using the sendmail postfix program (checked twice). Cron is still not sending emails. Any idea? Thanks Laszlo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any

Re: cron not sending emails

2010-05-30 Thread Jerry
On Sun, 30 May 2010 17:21:20 +0200 Laszlo Nagy gand...@shopzeus.com articulated: Cron is still not sending emails. Any idea? Is there any output in the 'maillog' log? -- Jerry freebsd.u...@seibercom.net Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore

Re: cron not sending emails

2010-05-30 Thread Matthias Apitz
=gandalf The gandalf user is a local user on the system. I can send local mail to this user using the sendmail postfix program (checked twice). Cron is still not sending emails. Any idea? Yes, check the log of cron (/var/log/cron) if you job is run at all; if so check the log of mails (/var/log

cron not sending emails

2010-05-28 Thread Laszlo Nagy
Hi All! After upgrading to 8.0 RELEASE, I'm not getting any emails from cron. If I put this into root's crontab * * * * * echo TEST then I see this in the maillog: May 14 10:53:00 server postfix/sendmail[2958]: fatal: user(1001): No recipient addresses found in message header I'm using

Re: cron not sending emails

2010-05-28 Thread Chuck Swiger
Hi-- On May 28, 2010, at 4:42 AM, Laszlo Nagy wrote: If I put this into root's crontab * * * * * echo TEST then I see this in the maillog: May 14 10:53:00 server postfix/sendmail[2958]: fatal: user(1001): No recipient addresses found in message header These do not correspond. It

Re: cron not sending emails

2010-05-28 Thread Laszlo Nagy
not correspond. I can assure you, that the maillog DOES correspond to the cron job. E.g. if I add two jobs for the same point in time, then two new lines will appear in the maillog, at exactly the given time. If I remove them, then no line will show up etc. It seems to think

Re: cron not sending emails

2010-05-28 Thread Matthias Fechner
Am 28.05.10 13:42, schrieb Laszlo Nagy: If I put this into root's crontab * * * * * echo TEST a quick guess, you have a line like: MAILTO=address Bye, Matthias -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the

Re: cron not sending emails

2010-05-28 Thread Laszlo Nagy
Matthias Fechner írta: Am 28.05.10 13:42, schrieb Laszlo Nagy: If I put this into root's crontab * * * * * echo TEST a quick guess, you have a line like: MAILTO=address Bye, Matthias It doesn't work. With, or without the MAILTO. Just for completeness, I have used this: MAILTO=gandalf

RE: Kill via Cron...

2010-04-21 Thread mcoyles
0:01.79 /sbin/dump -0 -auf - /usr (dump) 62225 ?? DL 0:01.81 /sbin/dump -0 -auf - /usr (dump) Have tried everything suggested thus far but nothing's done it as effectively as the original command run at commandline... just trying to automate the process by having cron kill at 8am. Cheers

Re: Kill via Cron...

2010-04-21 Thread Matthew Seaman
but nothing's done it as effectively as the original command run at commandline... just trying to automate the process by having cron kill at 8am. Hmmm is that because the system needs the resources for its usual functions after 8am? Or because if it hasn't finished by that time

Re: Kill via Cron...

2010-04-21 Thread Karl Vogel
On 21/04/2010 09:36:24, mcoyles wrote: M I'm actually trying to kill the following in one swep if they've taken M more than 8 hours to complete... : M 62221 ?? S 0:27.11 gzip -q M 62223 ?? DL 0:01.80 /sbin/dump -0 -auf - /usr (dump) M 62224 ?? DL 0:01.79 /sbin/dump -0 -auf -

Kill via Cron...

2010-04-20 Thread mcoyles
Morning all - on FreeBSD 7.1 (for various reasons - don't ask) Am attempting to run the following via cron but it keeps erroring out: kill -9 `ps ax | grep backup | grep -v grep | awk '{print $1}'` kill -9 `ps ax | grep dump | grep -v grep | awk '{print $1}'` Error: usage: kill [-s

Re: Kill via Cron...

2010-04-20 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/04/2010 08:52:58, mcoyles wrote: Morning all - on FreeBSD 7.1 (for various reasons - don't ask) Am attempting to run the following via cron but it keeps erroring out: kill -9 `ps ax | grep backup | grep -v grep | awk '{print $1}'` kill -9

RE: Kill via Cron...

2010-04-20 Thread mcoyles
On 20/04/2010 08:52:58, mcoyles wrote: Morning all - on FreeBSD 7.1 (for various reasons - don't ask) Am attempting to run the following via cron but it keeps erroring out: kill -9 `ps ax | grep backup | grep -v grep | awk '{print $1}'` kill -9 `ps ax | grep dump | grep -v grep | awk

Re: Kill via Cron...

2010-04-20 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/04/2010 11:24:44, mcoyles wrote: On 20/04/2010 08:52:58, mcoyles wrote: Morning all - on FreeBSD 7.1 (for various reasons - don't ask) Am attempting to run the following via cron but it keeps erroring out: kill -9 `ps ax | grep backup

Re: Kill via Cron...

2010-04-20 Thread Randal L. Schwartz
mcoyles == mcoyles mcoy...@horbury.wakefield.sch.uk writes: mcoyles kill -9 [from a post I made frequently in comp.unix.questions...] No no no. Don't use kill -9. It doesn't give the process a chance to cleanly: 1) release IPC resources (shared memory, semaphores, message queues) 2)

Re: Kill via Cron...

2010-04-20 Thread Karl Vogel
On Tue, 20 Apr 2010 08:52:58 +0100, mcoyles mcoy...@horbury.wakefield.sch.uk said: M kill -9 `ps ax | grep backup | grep -v grep | awk '{print $1}'` I've typed ps ax | grep something | grep -v grep often enough to automate it. The psax script below accepts an optional egrep-style

Re: Kill via Cron...

2010-04-20 Thread Randal L. Schwartz
Karl == Karl Vogel voge...@hcst.com writes: On Tue, 20 Apr 2010 08:52:58 +0100, mcoyles mcoy...@horbury.wakefield.sch.uk said: M kill -9 `ps ax | grep backup | grep -v grep | awk '{print $1}'` And you don't have to remember grep -v grep if you remember to use ps axc (note the c), since

Re: Kill via Cron...

2010-04-20 Thread George Davidovich
On Tue, Apr 20, 2010 at 12:57:25PM -0700, Randal L. Schwartz wrote: Karl == Karl Vogel voge...@hcst.com writes: On Tue, 20 Apr 2010 08:52:58 +0100, mcoyles mcoy...@horbury.wakefield.sch.uk said: M kill -9 `ps ax | grep backup | grep -v grep | awk '{print $1}'` And you don't

Trying run a php script from cron

2010-03-09 Thread Darrell Betts
I am trying to run a php script from the cron tab and these are the errors I receive: /usr/local/bin/php php -q /home//ripper.php result Could not open input file: php /usr/local/bin/php php -/home//ripper.php result Could not open input file: php /usr/local/bin/php -/home/

Re: Trying run a php script from cron

2010-03-09 Thread Nerius Landys
I am trying to run a php script from the cron tab and these are the errors I receive: /usr/local/bin/php php -q /home//ripper.php result Could not open input file: php /usr/local/bin/php php -/home//ripper.php result Could not open input file: php /usr/local/bin/php -/home/

How to run cron scripts (310.locate) in chrooted env.

2010-02-09 Thread Erik Norgaard
Hi: I have a setup with diskless clients mounting /var/diskless/FreeBSD read-only as root file system. How do I configure cron/locate.rc to run on the server such that the locate database is relative to the root for the diskless systems? I could do a chroot and run it within

export PATH in script called via Cron.

2009-10-16 Thread Paul Halliday
I have a script that I call via Cron. It wont work unless I include a path: #!/usr/local/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin export $PATH which is fine and works. Out of curiosity though, why is it that if I call it from the cl like ./test.sh I get

Re: export PATH in script called via Cron.

2009-10-16 Thread krad
2009/10/16 Paul Halliday paul.halli...@gmail.com I have a script that I call via Cron. It wont work unless I include a path: #!/usr/local/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin export $PATH which is fine and works. Out of curiosity though, why

Re: Resetting user password in cron

2009-07-17 Thread Lowell Gilbert
Glen Barber glen.j.bar...@gmail.com writes: On Thu, Jul 16, 2009 at 8:39 PM, Jos Chrispijnj...@webrz.net wrote: Can someone tell me how I can reset a user's password best in a cron job? If I do a password change from the prompt, I now have to re-enter the password, which I would not like

Resetting user password in cron

2009-07-16 Thread Jos Chrispijn
Can someone tell me how I can reset a user's password best in a cron job? If I do a password change from the prompt, I now have to re-enter the password, which I would not like to do in a cron job. Thanks/ Jos Chrispijn ___ freebsd-questions

Re: Resetting user password in cron

2009-07-16 Thread Glen Barber
On Thu, Jul 16, 2009 at 8:39 PM, Jos Chrispijnj...@webrz.net wrote: Can someone tell me how I can reset a user's password best in a cron job? If I do a password change from the prompt, I now have to re-enter the password, which I would not like to do in a cron job. Thanks/ Hi, Jos You can

Re: Resetting user password in cron

2009-07-16 Thread Josef Grosch
On Fri, Jul 17, 2009 at 02:39:51AM +0200, Jos Chrispijn wrote: Can someone tell me how I can reset a user's password best in a cron job? If I do a password change from the prompt, I now have to re-enter the password, which I would not like to do in a cron job. Thanks/ Jos Chrispijn man pw

Re: Resetting user password in cron

2009-07-16 Thread Mel Flynn
On Thursday 16 July 2009 16:39:51 Jos Chrispijn wrote: Can someone tell me how I can reset a user's password best in a cron job? If I do a password change from the prompt, I now have to re-enter the password, which I would not like to do in a cron job. Thanks/ Take a look at pw(8

Re: Resetting user password in cron

2009-07-16 Thread Tim Judd
On 7/16/09, Jos Chrispijn j...@webrz.net wrote: Can someone tell me how I can reset a user's password best in a cron job? If I do a password change from the prompt, I now have to re-enter the password, which I would not like to do in a cron job. Thanks/ Jos Chrispijn yes newpasswd | passwd

cron output mail contains no recipient address

2009-06-15 Thread DA Forsyth
Hiya all Ever since I upgraded my backup server to 7.2R (via source compile) cron jobs that produce output that used to be emailed to me now fail with a report of contained no recipient addresses on the receiving server. Mail setup is very basic, just exim that delivers to the main server

cron mail problem solved

2009-06-15 Thread DA Forsyth
Why do I become so clever AFTER asking for help? Anyhow, I have solved the cron not sending email problem. The cron log file contains lines like this NSSWITCH(nss_method_lookup): nis, group_compat, setgrent, not found which when searched for produces the page at http://www.ivorde.ro

Re: cron mail problem solved

2009-06-15 Thread Frank Shute
On Mon, Jun 15, 2009 at 11:11:14AM +0200, DA Forsyth wrote: Why do I become so clever AFTER asking for help? Anyhow, I have solved the cron not sending email problem. The cron log file contains lines like this NSSWITCH(nss_method_lookup): nis, group_compat, setgrent, not found which when

Re: cron mail problem solved

2009-06-15 Thread Tim Judd
On 6/15/09, DA Forsyth d.fors...@ru.ac.za wrote: Why do I become so clever AFTER asking for help? Anyhow, I have solved the cron not sending email problem. The cron log file contains lines like this NSSWITCH(nss_method_lookup): nis, group_compat, setgrent, not found which when searched

Re: Limiting resources in cron jobs

2009-05-22 Thread Dan
exec the script with softlimit from daemontools (very easy to use), or exec with ulimit in the shell. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to

Re: Limiting resources in cron jobs

2009-05-20 Thread Mel Flynn
On Saturday 16 May 2009 19:27:22 Kirk Strauser wrote: www:\ :cputime=300:\ :tc=default: I've run cap_mkdb /etc/login.conf to make that live. Then, I used vipw to change www's class: www:*:80:80:www:0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin However, I

Re: Limiting resources in cron jobs

2009-05-20 Thread Kirk Strauser
On May 20, 2009, at 7:00 AM, Mel Flynn wrote: Check with top what the CPU time is, it's not the same as the wall clock. Give me *some* credit. :-) -- Kirk Strauser ___ freebsd-questions@freebsd.org mailing list

Re: Limiting resources in cron jobs

2009-05-20 Thread Mel Flynn
On Wednesday 20 May 2009 16:18:28 Kirk Strauser wrote: On May 20, 2009, at 7:00 AM, Mel Flynn wrote: Check with top what the CPU time is, it's not the same as the wall clock. Give me *some* credit. :-) Sorry, haven't you heard? Financial crisis ;) Are you sure cron respects login.conf? I

Limiting resources in cron jobs

2009-05-16 Thread Kirk Strauser
I have a jail where the www user runs hourly cron jobs. On rare occasion, these jobs get stuck in a seemingly infinite CPU loop - a Python script calls Ghostscript and that child process never returns - and I have to manually kill them. I'd like to use login.conf to set resource limits

Re: Cron Not Sending Mail

2009-03-10 Thread APseudoUtopia
On Wed, Mar 4, 2009 at 11:38 AM, Morgan Wesström freebsd-questi...@pp.dyndns.biz wrote: Yeah, I am aware what dnl does. The reason I commented that stuff out is because I have no use for any of it - all those files (access, local-host-names, mailertable, virtusertable, etc) are all empty by

Re: Cron Not Sending Mail

2009-03-04 Thread Morgan Wesström
APseudoUtopia wrote: In my case I only see either local there or my smart host as defined in /var/mail/{hostname}.mc Can you provide a diff -u between /etc/mail/freebsd.mc and /etc/mail/{hostname}.mc ? /Morgan I'd switch over to postfix, but I'm only using this to send output from cron

Re: Cron Not Sending Mail

2009-03-04 Thread APseudoUtopia
? /Morgan I'd switch over to postfix, but I'm only using this to send output from cron and the daily security run scripts. I don't receive any mail over the network, so I think it'd be pointless to go through the effort of switching and configuring another MTA. Here's the diff. I figured

Re: Cron Not Sending Mail

2009-03-04 Thread Morgan Wesström
Yeah, I am aware what dnl does. The reason I commented that stuff out is because I have no use for any of it - all those files (access, local-host-names, mailertable, virtusertable, etc) are all empty by default and I had no reason to add anything to them. I'll try going back to the default

  1   2   3   4   5   6   7   >