You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Reinhard Poetz <re...@apache.org> on 2006/10/31 22:20:18 UTC
[zone] help with crontab
I need some help with crontab at the Cocoon zone. I want to add the script
/home/maven/continuum-project-builder/run.sh to the crontab of the Maven user.
I tried
0 0 0/4 * * /home/maven/continuum-project-builder/run.sh > /home/maven/cron.log
but this results in following error message:
crontab: error on previous line; number out of bounds.
crontab: errors detected in input, no crontab file generated.
I want to see this script run every 4 hours.
Could some cron expert help me?
BTW, adding the script will force Continuum to build the "$cdocs" project,
independently if there was a change in SVN or not.
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: [zone] help with crontab
Posted by Reinhard Poetz <re...@apache.org>.
Bertrand Delacretaz wrote:
> On 10/31/06, Reinhard Poetz <re...@apache.org> wrote:
>
>> ...I entered
>>
>> 0 1,5,9,13,17,21 * * * /home/maven/continuum-project-builder/run.sh >
>> /home/maven/cron.log
>
> Isn't that missing a field? You should have 5 values or stars, with
> hours in second position:
>
> * 0 1,5,9,13,17,21 * * *
>
> And this should work as well:
>
> * */4 * * *
>
> You might also want to add 2>&1 at the end of your command, so that
> standard error also goes to your log file, otherwise it would be sent
> by mail to the user, if there's anything written to it.
I've applied your suggestions, thanks!
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Der fr�he Vogel f�ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: [zone] help with crontab
Posted by Bertrand Delacretaz <bd...@apache.org>.
On 10/31/06, Reinhard Poetz <re...@apache.org> wrote:
> ...I entered
>
> 0 1,5,9,13,17,21 * * * /home/maven/continuum-project-builder/run.sh >
> /home/maven/cron.log
Isn't that missing a field? You should have 5 values or stars, with
hours in second position:
* 0 1,5,9,13,17,21 * * *
And this should work as well:
* */4 * * *
You might also want to add 2>&1 at the end of your command, so that
standard error also goes to your log file, otherwise it would be sent
by mail to the user, if there's anything written to it.
-Bertrand
Re: [zone] help with crontab
Posted by Reinhard Poetz <re...@apache.org>.
Reinhard Poetz wrote:
>
> I need some help with crontab at the Cocoon zone. I want to add the
> script /home/maven/continuum-project-builder/run.sh to the crontab of
> the Maven user.
>
> I tried
>
> 0 0 0/4 * * /home/maven/continuum-project-builder/run.sh >
> /home/maven/cron.log
I entered
0 1,5,9,13,17,21 * * * /home/maven/continuum-project-builder/run.sh >
/home/maven/cron.log
I could save it now successfully though a review would be highly appreciated.
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de