Re: cron job not executing

2012-05-06 Thread Tony Baldwin
On Sun, May 06, 2012 at 11:24:44AM +, Camaleón wrote:
> On Sat, 05 May 2012 18:26:30 -0400, Tony Baldwin wrote:
> 
> > I've got a little cron job,
> > just trying to fire off a script (see http://tonyb.us/mattbot ) and it's
> > not firing.
> > 
> > I have other jobs on the same crontab that do. When I run the script
> > manually, it runs.
> 
> (...)
> 
> Here is a good collection of the common reasons why a cron job does not 
> engage:
> 
> http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work
> 
> P.S. I vote for the missing empty line :-P

Ha! I think that WAS it!
Always something so simple and easily overlooked...

tony
-- 
http://www.tonybaldwin.me
all tony, all the time!
3F330C6E


signature.asc
Description: Digital signature


Re: cron job not executing

2012-05-06 Thread Tony Baldwin
On Sun, May 06, 2012 at 02:07:08AM +0300, Adrian Fita wrote:
> On 06/05/12 01:26, Tony Baldwin wrote:
> > I've got a little cron job, 
> > just trying to fire off a script (see http://tonyb.us/mattbot )
> > and it's not firing.
> 
> [...]
> 
> > Probably something really obvious I'm overlooking, but the more I look,
> > the less I see why there's a problem.
> > 
> > any and all assistance appreciated in advance
> 
> Have you tried looking at the cron log to check and see if the script is
> firing? You might have to enable the cron log if there is no log from
> cron (check here: [1]).

I couldn't find a "cron log" per se, but figured out stuff from cron
is logged in syslog.

I also piped output from my script to a log, but it didn't reveal
anything until cron started firing it off.
Now it's working.

I have not determined what the initial problem was.
I think restarting cron, perhaps, is what solved the issue, however.

thanks,
tony
-- 
http://www.tonybaldwin.me
all tony, all the time!
3F330C6E


signature.asc
Description: Digital signature


Re: cron job not executing

2012-05-06 Thread Martin McCormick
=?iso-8859-1?q?Camale=F3n?= writes:
> Here is a good collection of the common reasons why a cron job does not
> engage:
> 
> http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work

One thing you can do is to set an "at" job to run your
script once. Go to the directory you want to run the job from
and type something like

at 12:00 may 31

after hitting enter and getting the at prompt, type the name of
the script. Hit Enter again and Control-D to save the job and
take note of the job number.

Now do at -c job#,  whatever that is, and pipe it to a
file.

This will be a script in and of itself and contain the
environment you had when you ran the at command. Save your path
and any other important variables and junk the rest. Now edit
your script and put the environment data at the top, editing as
appropriate.

You can now junk the at job with atrm job#.

I have done this before when cron jobs ran manually but didn't
run under cron and at least the environment reminds you what it
should have to work correctly.

Martin McCormick


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201205061745.q46hjxpx023...@x.it.okstate.edu



Re: cron job not executing

2012-05-06 Thread Camaleón
On Sat, 05 May 2012 18:26:30 -0400, Tony Baldwin wrote:

> I've got a little cron job,
> just trying to fire off a script (see http://tonyb.us/mattbot ) and it's
> not firing.
> 
> I have other jobs on the same crontab that do. When I run the script
> manually, it runs.

(...)

Here is a good collection of the common reasons why a cron job does not 
engage:

http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work

P.S. I vote for the missing empty line :-P

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/jo5n1s$kir$4...@dough.gmane.org



Re: cron job not executing

2012-05-05 Thread Patrick Wiseman
On Sat, May 5, 2012 at 6:26 PM, Tony Baldwin  wrote:
> I've got a little cron job,
> just trying to fire off a script (see http://tonyb.us/mattbot )
> and it's not firing.
>
> I have other jobs on the same crontab that do.
> When I run the script manually, it runs.

[...]

> Probably something really obvious I'm overlooking, but the more I look,
> the less I see why there's a problem.

In my experience with cron jobs it's either permissions or path.
Permissions you said are OK, so I'd put a PATH statement in your
script (I notice it has none), which includes a path to your script
and any programs it calls. Cron jobs operate with a very lean
environment, so the fact it works when you run it from the command
line is no guarantee it will run as a cron job.

Patrick


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAJVvKsPPwiydV=tw0h_qnh+8zac8mgbybqkd09_uv+wc1rx...@mail.gmail.com



Re: cron job not executing

2012-05-05 Thread Adrian Fita
On 06/05/12 01:26, Tony Baldwin wrote:
> I've got a little cron job, 
> just trying to fire off a script (see http://tonyb.us/mattbot )
> and it's not firing.

[...]

> Probably something really obvious I'm overlooking, but the more I look,
> the less I see why there's a problem.
> 
> any and all assistance appreciated in advance

Have you tried looking at the cron log to check and see if the script is
firing? You might have to enable the cron log if there is no log from
cron (check here: [1]).

  1. http://happy-coding.com/enable-crontab-logging-in-debian-linux/

-- 
Fita Adrian


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4fa5b29c.8050...@gmail.com



Re: cron job mergelog failure

2012-02-09 Thread Tony Baldwin
On Wed, Feb 08, 2012 at 01:59:27PM -0500, Tony Baldwin wrote:
> On Wed, Feb 08, 2012 at 08:35:44AM -0800, Noah Meyerhans wrote:
> > On Wed, Feb 08, 2012 at 10:57:54AM -0500, Tony Baldwin wrote:
> > > > > 0 1 * * * mergelog /var/log/apache2/access.log [...]
> > > > > Every day I get an e-mail telling me this failed.
> > > > 
> > > > > Now, I can go in and to this manually, 
> > > > > Why can't cron do it without my intervention?
> > > > 
> > > > 
> > > > What reason does the email give for the failure?
> > > > Chris
> > > 
> > > 
> > > mv: cannot stat `/var/log/apache2/MY.log': No such file or directory
> > > Clearly not merging logs and creating the MY.log file.
> > > I will try with the fully path and see happens tonight.
> > 
> > Your first cron job:
> > 0 1 * * * mergelog /var/log/apache2/access.log 
> > /var/log/apache2/other_vhosts_access.log /var/log/apache2/my.log > MY.log
> > 
> > This does not run with /var/log/apache2/ as $PWD, so MY.log won't be
> > created in that directory.  Try being explicit about the path to MY.log,
> > e.g. /var/log/apache2/MY.log
> > 
> > noah
> > 
> 
> Aha!
> I'm guessing this is precisely the (rather so obvious it hid in plain
> site) problem.
> 
> (senility...it's my only excuse...I turned 30 for the 13th time on
> Monday)
> 

Looks like it is now working as it should.

RESOLVED!

thanks,
tony
-- 
http://www.tonybaldwin.me
all tony, all the time!


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20120209125723.ga11...@deathstar.hsd1.ct.comcast.net



Re: cron job mergelog failure

2012-02-08 Thread Tony Baldwin
On Wed, Feb 08, 2012 at 08:35:44AM -0800, Noah Meyerhans wrote:
> On Wed, Feb 08, 2012 at 10:57:54AM -0500, Tony Baldwin wrote:
> > > > 0 1 * * * mergelog /var/log/apache2/access.log [...]
> > > > Every day I get an e-mail telling me this failed.
> > > 
> > > > Now, I can go in and to this manually, 
> > > > Why can't cron do it without my intervention?
> > > 
> > > 
> > > What reason does the email give for the failure?
> > > Chris
> > 
> > 
> > mv: cannot stat `/var/log/apache2/MY.log': No such file or directory
> > Clearly not merging logs and creating the MY.log file.
> > I will try with the fully path and see happens tonight.
> 
> Your first cron job:
> 0 1 * * * mergelog /var/log/apache2/access.log 
> /var/log/apache2/other_vhosts_access.log /var/log/apache2/my.log > MY.log
> 
> This does not run with /var/log/apache2/ as $PWD, so MY.log won't be
> created in that directory.  Try being explicit about the path to MY.log,
> e.g. /var/log/apache2/MY.log
> 
> noah
> 

Aha!
I'm guessing this is precisely the (rather so obvious it hid in plain
site) problem.

(senility...it's my only excuse...I turned 30 for the 13th time on
Monday)

Thanks!

./tony
-- 
http://www.tonybaldwin.me
all tony, all the time!


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20120208185926.gb22...@deathstar.hsd1.ct.comcast.net



Re: cron job mergelog failure

2012-02-08 Thread Noah Meyerhans
On Wed, Feb 08, 2012 at 10:57:54AM -0500, Tony Baldwin wrote:
> > > 0 1 * * * mergelog /var/log/apache2/access.log [...]
> > > Every day I get an e-mail telling me this failed.
> > 
> > > Now, I can go in and to this manually, 
> > > Why can't cron do it without my intervention?
> > 
> > 
> > What reason does the email give for the failure?
> > Chris
> 
> 
> mv: cannot stat `/var/log/apache2/MY.log': No such file or directory
> Clearly not merging logs and creating the MY.log file.
> I will try with the fully path and see happens tonight.

Your first cron job:
0 1 * * * mergelog /var/log/apache2/access.log 
/var/log/apache2/other_vhosts_access.log /var/log/apache2/my.log > MY.log

This does not run with /var/log/apache2/ as $PWD, so MY.log won't be
created in that directory.  Try being explicit about the path to MY.log,
e.g. /var/log/apache2/MY.log

noah



signature.asc
Description: Digital signature


Re: cron job mergelog failure

2012-02-08 Thread Tony Baldwin
On Wed, Feb 08, 2012 at 09:18:32AM +, Chris Davies wrote:
> Tony Baldwin  wrote:
> > 0 1 * * * mergelog /var/log/apache2/access.log [...]
> > Every day I get an e-mail telling me this failed.
> 
> > Now, I can go in and to this manually, 
> > Why can't cron do it without my intervention?
> 
> 
> What reason does the email give for the failure?
> Chris


mv: cannot stat `/var/log/apache2/MY.log': No such file or directory
Clearly not merging logs and creating the MY.log file.
I will try with the fully path and see happens tonight.

./tony
-- 
http://www.tonybaldwin.me
all tony, all the time!


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20120208155753.ga17...@deathstar.hsd1.ct.comcast.net



Re: cron job mergelog failure

2012-02-08 Thread Chris Davies
Tony Baldwin  wrote:
> 0 1 * * * mergelog /var/log/apache2/access.log [...]
> Every day I get an e-mail telling me this failed.

> Now, I can go in and to this manually, 
> Why can't cron do it without my intervention?


What reason does the email give for the failure?
Chris


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/88r909x12j@news.roaima.co.uk



Re: cron job mergelog failure

2012-02-08 Thread Arif Hossain
On Wed, 2012-02-08 at 01:27 -0500, Tony Baldwin wrote:
> I have the following in my root crontab on my webserver:
> 
> 0 1 * * * mergelog /var/log/apache2/access.log
> /var/log/apache2/other_vhosts_access.log /var/log/apache2/my.log >
> MY.log
>   4 2 1 * * * mv /var/log/apache2/MY.log /var/log/apache2/my.log
> 5 5 1 * * * webalizer
> 
> Every day I get an e-mail telling me this failed.
> 
> Now, I can go in and to this manually, 
> mergelog my.log access.log other_vhosts_access.log > MY.log
> # to merge the existing merged log with the new logs
> the 
> mv MY.log my.log
> to move the newly merged log to my.log (which webalizer is configured to
> read)
> run webalizer
> profit.
> 
> Why can't cron do it without my intervention?
> 
> ./tony
> -- 
> http://www.tonybaldwin.me
> all tony, all the time!
> 
> 

May be its because of $PATH inside cron. It will better if you use full
path of "mergelog".


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/blu0-smtp208fd6246dad94e84f6692ae...@phx.gbl



Re: Cron job

2010-08-23 Thread Burton Samograd
"Boyd Stephen Smith Jr."  writes:

> Finally, while you currently make your order via phone, it may be that
> your distributor has a more easily automated method, so it may be
> worth talking to their customer support and exploring the other
> ordering options.

LOL :)

--
Burton Samograd


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/hbtyml5okh@rex.userful.ca



Re: Cron job

2010-08-22 Thread Boyd Stephen Smith Jr.
TOFU corrected. <>

This mailing list prefers a well-trimmed and interleaved posting style.  
Trimming the quoted text being the most important part of that.

In , Poo Py wrote:
>> From: b...@iguanasuicide.net
>> In , Poo Py wrote:
>> >Hi I'm tired of [...] ordering horny goat weed every week manually so can
>> >someone please make a [...] cron job to do this for me?
>> 
>> You'll have to better describe how you order horny goat weed in order for
>> me to write a script that does it for you.  Computers are very good at
>> following directions, but your have to be very clear, specific, and
>> incremental with all your directions.
>
>I order by phone thanks.

I think you misunderstand the purpose of this list.  We are not a nameless 
pool of labor for you.  Rather, we are individuals, some of which, if you ask 
nicely may have some time to donate to help you accomplish tasks with or 
diagnose errors in your Debian installation.

On top of that, few of us are mind readers, so you will need to be very 
specific in telling us: what you've tried, what you know, and what results 
you've gotten so far.

I know very little about automating the process of placing a phone call and 
playing back pre-recorded responses and/or touch-tones, which is most likely 
what you would need the shell script to do.  However, you might be able to 
find more information by reading about a piece of software called Asterix; it 
handles the software side of a "PBX".  I fear your cursing and terseness may 
have already put off many of the members of the mailing list that already have 
the knowledge to help with this task.

Still, a new thread, with more specific questions, no cursing, and a more 
pleasant attitude may very well get you some better answers.

Finally, while you currently make your order via phone, it may be that your 
distributor has a more easily automated method, so it may be worth talking to 
their customer support and exploring the other ordering options.
-- 
Boyd Stephen Smith Jr.   ,= ,-_-. =.
b...@iguanasuicide.net   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/\_/


signature.asc
Description: This is a digitally signed message part.


RE: Cron job

2010-08-22 Thread Poo Py
Thanks but how did you make the shell script? Please post contents to list. 
Thanks. 

> Date: Sat, 21 Aug 2010 00:57:22 +0400
> Subject: Re: Cron job
> From: eero.voloti...@iki.fi
> To: debiantux...@hotmail.com
> CC: debian-user@lists.debian.org
> 
> 2010/8/20 Poo Py :
> > Hi I'm tired of fucking ordering horny goat weed every week manually so can
> > someone please make a fucking cron job to do this for me? Many thanks and
> > god bless your kind souls.
> >
> 
> crontab -e and:
> 
> @weekly /path/to/order_horny_goat_weed.sh
> 
> --
> Eero
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: 
> http://lists.debian.org/aanlktin+qkulfohiekojj3dxi1axpvy+_sfp4bhgb...@mail.gmail.com
> 
  

Re: Cron job

2010-08-20 Thread Eero Volotinen
2010/8/20 Poo Py :
> Hi I'm tired of fucking ordering horny goat weed every week manually so can
> someone please make a fucking cron job to do this for me? Many thanks and
> god bless your kind souls.
>

crontab -e and:

@weekly /path/to/order_horny_goat_weed.sh

--
Eero


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktin+qkulfohiekojj3dxi1axpvy+_sfp4bhgb...@mail.gmail.com



Re: Cron job not cooperating

2007-06-07 Thread Martin Schulze
Tom Scrape wrote:
> Is there a location (eg. log file) where run-parts activity can be found?  Or 
> is
> it rather just hit-and-miss debugging when trying to figure out a problem?  

Output is normally not generated.  It's only generated in case of an
error.  Since it is executed by cron (<== /etc/crontab) it would be
sent to the account denoted by MAILTO= in said file.  If you haven't
changed anything that'll be the root account whose mail is probably
forwarded to your user account or something.

> For reference, the problem is fixed thanks to the previous suggestion, but I'm
> curious now as to the mechanisms behind this.  Man pages enough?

man cron, man crontab, man run-parts, Debian tutorial.

Regards,

Joey

-- 
GNU does not eliminate all the world's problems, only some of them.
-- The GNU Manifesto

Please always Cc to me when replying to me on the lists.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



RE: Cron job not cooperating

2007-06-07 Thread Tom Scrape
> -Original Message-
> Sent: Thursday, June 07, 2007 1:32 AM
> 
> Tom Scrape wrote:
> > Cron.log shows nothing:
> > [EMAIL PROTECTED]:/var/log# cat cron.log |grep pflogsumm
> > [EMAIL PROTECTED]:/var/log#
> 
> Err...
> 
> The program is not executed by cron but by run-parts (which is
> executed by cron, if that matters, via /etc/crontab).
> 
> Programms in /etc/cron.{daily,weekly,monthly,hourly} are executed
> regularly via run-parts.  Their name doesn't appear in the logs
> since it's not cron that executes them.
> 
> For testing purpose, try executing it standalone, and maybe add
> debug output (echo "$(date) script started" >> /var/log/daily.log)
> and inspect the log after the daily jobs have been run.
> 

Thanks for the clarification.  Hadn't realized that.

Is there a location (eg. log file) where run-parts activity can be found?  Or is
it rather just hit-and-miss debugging when trying to figure out a problem?  

For reference, the problem is fixed thanks to the previous suggestion, but I'm
curious now as to the mechanisms behind this.  Man pages enough?


--T



Re: Cron job not cooperating

2007-06-06 Thread Joey Schulze
Tom Scrape wrote:
> My /etc/cron.daily contains the problem file:
> [EMAIL PROTECTED]:/etc/cron.daily# ll pflogsumm-daily.cron
> -rwxr-xr-x 1 root root 354 2007-06-06 08:49 pflogsumm-daily.cron

> Cron.log shows nothing:
> [EMAIL PROTECTED]:/var/log# cat cron.log |grep pflogsumm
> [EMAIL PROTECTED]:/var/log#

Err...

The program is not executed by cron but by run-parts (which is
executed by cron, if that matters, via /etc/crontab).

Programms in /etc/cron.{daily,weekly,monthly,hourly} are executed
regularly via run-parts.  Their name doesn't appear in the logs
since it's not cron that executes them.

For testing purpose, try executing it standalone, and maybe add
debug output (echo "$(date) script started" >> /var/log/daily.log)
and inspect the log after the daily jobs have been run.

Regards,

Joey

-- 
GNU does not eliminate all the world's problems, only some of them.
-- The GNU Manifesto

Please always Cc to me when replying to me on the lists.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



RE: Cron job not cooperating

2007-06-06 Thread Tom Scrape
> -Original Message-
> Sent: Wednesday, June 06, 2007 10:40 AM
> 
> On Wed, 6 Jun 2007, Tom Scrape wrote:
> 
> > I have a cron job that's not running when I think it should
> > be... that is, it's not running at all.
> >
> > My /etc/cron.daily contains the problem file:
> > [EMAIL PROTECTED]:/etc/cron.daily# ll pflogsumm-daily.cron
> > -rwxr-xr-x 1 root root 354 2007-06-06 08:49 pflogsumm-daily.cron
> >
> > This file contains:
> > [EMAIL PROTECTED]:/etc/cron.daily# cat pflogsumm-daily.cron
> > #!/bin/bash
> > #
> > # 20061213 Cron to gather stats from mail logs and email to admin.
> > #  Pflogsumm can also be run by itself and/or with many
> > #  other options.  Check the man page.
> > # 20070104 Updated path after move to new server.
> > /usr/sbin/pflogsumm -d yesterday /var/log/mail.log 2>&1 
> |mail -s "`uname -n`
> > daily mail stats" postmaster
> >
> >
> > The problem is that this job never runs.
> >
> 
> >
> > Cron.log shows nothing:
> > [EMAIL PROTECTED]:/var/log# cat cron.log |grep pflogsumm
> > [EMAIL PROTECTED]:/var/log#
> >
> >
> > The command works as expected when copying and pasting to 
> the command line.
> > Furthermore, this script worked fine on the previous FC5 
> machine (the only
> > difference being the name of the log file.
> >
> > I just sent this server live a few days ago, so I've been 
> running the script
> > manually until I figure it out, but I'm having no luck.  
> Any idea what I'm
> > overlooking here?  Is it a Debian peculiarity that I've not 
> yet discovered, or
> > am I more generally confused?  Thanks for any direction.
> >
> >
> > --T
> 
> try renaming the file pflogsumm-daily.cron to pflogsumm-daily-cron, 
> periods aren't allowed or add the --lsbsysinit to the 
> /etc/crontab file.
> 
> from man run-parts:
> If the  --lsbsysinit  option  is not given then the names must consist
> entirely of upper and lower  case  letters,  digits,  underscores, and
> hyphens.
> 
> 

Blast!  Had to be a technicality, didn't it?  Many thanks.  That should save me
a little effort again.


--T


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Cron job not cooperating

2007-06-06 Thread Jeff D

On Wed, 6 Jun 2007, Tom Scrape wrote:


I have a cron job that's not running when I think it should
be... that is, it's not running at all.

My /etc/cron.daily contains the problem file:
[EMAIL PROTECTED]:/etc/cron.daily# ll pflogsumm-daily.cron
-rwxr-xr-x 1 root root 354 2007-06-06 08:49 pflogsumm-daily.cron

This file contains:
[EMAIL PROTECTED]:/etc/cron.daily# cat pflogsumm-daily.cron
#!/bin/bash
#
# 20061213 Cron to gather stats from mail logs and email to admin.
#  Pflogsumm can also be run by itself and/or with many
#  other options.  Check the man page.
# 20070104 Updated path after move to new server.
/usr/sbin/pflogsumm -d yesterday /var/log/mail.log 2>&1 |mail -s "`uname -n`
daily mail stats" postmaster


The problem is that this job never runs.





Cron.log shows nothing:
[EMAIL PROTECTED]:/var/log# cat cron.log |grep pflogsumm
[EMAIL PROTECTED]:/var/log#


The command works as expected when copying and pasting to the command line.
Furthermore, this script worked fine on the previous FC5 machine (the only
difference being the name of the log file.

I just sent this server live a few days ago, so I've been running the script
manually until I figure it out, but I'm having no luck.  Any idea what I'm
overlooking here?  Is it a Debian peculiarity that I've not yet discovered, or
am I more generally confused?  Thanks for any direction.


--T


try renaming the file pflogsumm-daily.cron to pflogsumm-daily-cron, 
periods aren't allowed or add the --lsbsysinit to the /etc/crontab file.


from man run-parts:
If the  --lsbsysinit  option  is not given then the names must consist
entirely of upper and lower  case  letters,  digits,  underscores, and
hyphens.


hth,
Jeff

 -+-
8 out of 10 Owners who Expressed a Preference said Their Cats Preferred Techno.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Cron-job

2006-08-02 Thread Ed Curtis

On Wed, 2 Aug 2006, Oliver Jato wrote:

> > Example (which not works)
> > index.php
> >  >
> > // Read last timestamp
> > $file_name = "last_mail";
> > $file = fopen($file_name, "r+");
> > $content = fread($file, filesize($filename));
> >
> > $time = time();
> > if($file[0] >= $time + $diff) {
> > include "mailscript.php";
> >
> > // Write time back to file
> > fseek($file, 0);
> > fwrite($file, $time);
> > }
> >
> > fclose($file);
> >
> > ?>
>
> either like this, where it would be good if you could register the
> script as a shutdown function, but then you'll have to be aware of the
> difference in behaviour of register_shutdown_function() in differing php
> versions.
> or, if you're lucky, the cli version of php is installed and you can
> call any php script with "php -f yourscript.php".
>

 If you don't have php cli installed on your machine, you can also use
wget to call your script from cron. Check the man page for details on how
to use it. It's very simple.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Cron-job

2006-08-02 Thread Oliver Jato
> Example (which not works)
> index.php
>  
>   // Read last timestamp
>   $file_name = "last_mail";
>   $file = fopen($file_name, "r+");
>   $content = fread($file, filesize($filename));
> 
>   $time = time();
>   if($file[0] >= $time + $diff) {
>   include "mailscript.php";
> 
>   // Write time back to file
>   fseek($file, 0);
>   fwrite($file, $time);
>   }
> 
>   fclose($file);
> 
> ?>

either like this, where it would be good if you could register the
script as a shutdown function, but then you'll have to be aware of the
difference in behaviour of register_shutdown_function() in differing php
versions.
or, if you're lucky, the cli version of php is installed and you can
call any php script with "php -f yourscript.php".


Grüße / Regards,
Oliver
--
Earth -- mother of the most beautiful women in the universe. -- Apollo,
"Who Mourns for Adonais?" stardate 3468.1


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Cron-job

2006-08-02 Thread Michael Ott
Hello Henning!

> I have a php-site on which I want to send periodic mails out.
> I want cron to schedule that, but I don't know how to get cron to
> manage that.
> I have my own Linux-box on which I put the line
> lynx http://blabla.com/mailscript.php
> but on my hosted webserver, there are obviously no lynx, cause it don't
> work.
> Then what?
> A perl or python script?
> Anyone who can help me?
Which PHP.
You can check when the last mail was send and than send a new one. And
you can put it in our website. And when anyone view this side that
script will run and do what you want.

Example (which not works)
index.php
= $time + $diff) {
include "mailscript.php";

// Write time back to file
fseek($file, 0);
fwrite($file, $time);
}

fclose($file);

?>


CU
 
  Michael  
  
-- 
,''`.   Michael Ott, e-mail: michael at zolnott dot de
   : :' :   Debian SID on Thinkpad T43: 
   `. `'http://www.zolnott.de/laptop/ibm-t43-uc34nge.html 
 `- 
Jeden Mittwoch von 21 - 24 Uhr. Zosh! auf Radio Z. 
Das Härteste, was der Musikmarkt zu bieten hat. http://www.zosh.de
Online hören: http://www.radio-z.net 



Re: Cron Job

1999-06-17 Thread Michael Merten
On Wed, Jun 16, 1999 at 11:26:05AM -0700, Lawrence Walton wrote:
> On Wed, Jun 16, 1999 at 11:18:21AM -0700, ASHA TARACHANDANI wrote:
> > Hi,
> > Can you give me how to set up a cron job on Solaris 5.6. Or refer me to
> > some site where this is explained.
> > -Asha
> > 
> > -- 
> > 
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > Asha Tarachandani   [EMAIL PROTECTED]
> > Intern, Internet Technology Engineering group
> > SUN, Milpitas, USA
> > (408) 276-3375
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > 
> > 
> Um, this is a Debian-user group for Linux and Hurd, why ask here?
> 
> PS. man cron
> -- 
> *--* Mail: [EMAIL PROTECTED]
> *--* Voice: 425.739.4247
> *--* Fax: 425.827.9577
> *--* HTTP://www.otak-k.com/~lawrence/
> --
> - - - - - - O t a k  i n c . - - - - - 
> 
Heh,

They asked here, because, as everybody knows, the accumulated knowledge
of the people on this list is so great that it is unlikely that somebody
DOESN'T know the answer ;)

Mike

-- 
Michael MertenNRA Life Member
[EMAIL PROTECTED]  www.fortunecity.com/skyscraper/linux/284
-
In Denver it is unlawful to lend your vacuum cleaner to your next-door
neighbor.


Re: Cron Job

1999-06-16 Thread Lawrence Walton
On Wed, Jun 16, 1999 at 11:18:21AM -0700, ASHA TARACHANDANI wrote:
> Hi,
> Can you give me how to set up a cron job on Solaris 5.6. Or refer me to
> some site where this is explained.
> -Asha
> 
> -- 
> 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Asha Tarachandani   [EMAIL PROTECTED]
> Intern, Internet Technology Engineering group
> SUN, Milpitas, USA
> (408) 276-3375
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < /dev/null
> 
Um, this is a Debian-user group for Linux and Hurd, why ask here?

PS. man cron
-- 
*--* Mail: [EMAIL PROTECTED]
*--* Voice: 425.739.4247
*--* Fax: 425.827.9577
*--* HTTP://www.otak-k.com/~lawrence/
--
- - - - - - O t a k  i n c . - - - - -