FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-06-2012, 11:24 AM
Camaleón
 
Default cron job not executing

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: jo5n1s$kir$4@dough.gmane.org">http://lists.debian.org/jo5n1s$kir$4@dough.gmane.org
 
Old 05-06-2012, 05:45 PM
Martin McCormick
 
Default cron job not executing

=?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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201205061745.q46HjXpx023152@x.it.okstate.edu">http ://lists.debian.org/201205061745.q46HjXpx023152@x.it.okstate.edu
 
Old 05-06-2012, 08:41 PM
Tony Baldwin
 
Default cron job not executing

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
 
Old 05-06-2012, 08:43 PM
Tony Baldwin
 
Default cron job not executing

On Sun, May 06, 2012 at 11:24:44AM +0000, 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
 

Thread Tools




All times are GMT. The time now is 05:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org