You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by du...@yahoo.com on 2005/09/13 20:06:59 UTC
Running a task between this hour and this hour
Running the stats on our code is a rather lenghty process (currently +/-70 minutes)...
I therefore consider to run the targets only at night.
Would someone have an hint on how to evaluate the current time and set a flag if it is between say
: 10 PM and 6:00 AM ?
Tx,
\T,
--
Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.
Martin Fowler
T. : +32 (0)2 742 05 94
M. : +32 (0)497 44 68 12
@ : duvelbier-tsmets@yahoo.com
Do you skype too ... ?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Running a task between this hour and this hour
Posted by Troy Daniels <tr...@baesystems.com>.
At 05:42 AM 9/15/2005, duvelbier-tsmets@yahoo.com wrote:
>Tx but ...
>The question was send to the ANT-ML to implement is via ANT... :)
Except that the right way to do this is to create a separate task that
generates the stats, the create a cron job to run ant and perform that task
at night.
What does he do if he needs to generate the stats at 2 in the
afternoon? Try to remember the kludge he put in and disable it? Or just
run ant with the nightly target?
If somebody asked you how to insert a screw using a hammer, I can think of
three answers:
a) Hold the hammer at a 45 degree angle, and insert the edge into the
screw. Rotate hammer.
b) Bang on the screw like it's a nail. Hope the threads cause the screw
to rotate.
c) Use a screwdriver.
Which seems like the best answer?
>\T,
>
>
>--- "J. David Boyd" <da...@adboyd.com> wrote:
>
> > <du...@yahoo.com> writes:
> >
> > > Running the stats on our code is a rather lenghty process (currently
> +/-70
> > > minutes)... I therefore consider to run the targets only at
> night. Would
> > > someone have an hint on how to evaluate the current time and set a
> flag if
> > > it is between say : 10 PM and 6:00 AM ?
> > >
> >
> > If you're on Unix or Linux use cron. If you're on windows use _Scheduled
> > Tasks_ from the Control Panel...
> >
> > Dave in Largo, FL
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>
>
>--
>Any fool can write code that a computer can understand.
>Good programmers write code that humans can understand.
> Martin Fowler
>T. : +32 (0)2 742 05 94
>M. : +32 (0)497 44 68 12
>@ : duvelbier-tsmets@yahoo.com
>Do you skype too ... ?
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
----------------------------------------
Troy Daniels
troy.daniels@baesystems.com
781-273-3388 x218
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Running a task between this hour and this hour
Posted by du...@yahoo.com.
Tx but ...
The question was send to the ANT-ML to implement is via ANT... :)
\T,
--- "J. David Boyd" <da...@adboyd.com> wrote:
> <du...@yahoo.com> writes:
>
> > Running the stats on our code is a rather lenghty process (currently +/-70
> > minutes)... I therefore consider to run the targets only at night. Would
> > someone have an hint on how to evaluate the current time and set a flag if
> > it is between say : 10 PM and 6:00 AM ?
> >
>
> If you're on Unix or Linux use cron. If you're on windows use _Scheduled
> Tasks_ from the Control Panel...
>
> Dave in Largo, FL
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
--
Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.
Martin Fowler
T. : +32 (0)2 742 05 94
M. : +32 (0)497 44 68 12
@ : duvelbier-tsmets@yahoo.com
Do you skype too ... ?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Running a task between this hour and this hour
Posted by "J. David Boyd" <da...@adboyd.com>.
<du...@yahoo.com> writes:
> Running the stats on our code is a rather lenghty process (currently +/-70
> minutes)... I therefore consider to run the targets only at night. Would
> someone have an hint on how to evaluate the current time and set a flag if
> it is between say : 10 PM and 6:00 AM ?
>
If you're on Unix or Linux use cron. If you're on windows use _Scheduled
Tasks_ from the Control Panel...
Dave in Largo, FL
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Running a task between this hour and this hour
Posted by du...@yahoo.com.
OK
so checking there is a "0" (zero) in the hours would be an good option for what I need.
Tx,
\T,
--- Ninju Bohra <ni...@yahoo.com> wrote:
> One way is to use the <tstamp> task with a custom pattern to contain only the hour (in 24hour
> format). Then using the <if> task (from the ant-contrib project) along with the a condition
> (like the <isLessThan> and <isGreaterThan> also from ant-contrib or write your own
> <isInBetween>) to control the setting of a property (called "isLateNight")
>
> Do all the above in a depends target and protect the worker targets with if=isLateNight
>
> I think that makes sense,
>
> Ninju
>
> duvelbier-tsmets@yahoo.com wrote:
>
> Running the stats on our code is a rather lenghty process (currently +/-70 minutes)...
> I therefore consider to run the targets only at night.
> Would someone have an hint on how to evaluate the current time and set a flag if it is between
> say
> : 10 PM and 6:00 AM ?
>
> Tx,
>
> \T,
>
> --
> Any fool can write code that a computer can understand.
> Good programmers write code that humans can understand.
> Martin Fowler
> T. : +32 (0)2 742 05 94
> M. : +32 (0)497 44 68 12
> @ : duvelbier-tsmets@yahoo.com
> Do you skype too ... ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>
>
>
> ---------------------------------
> Yahoo! for Good
> Click here to donate to the Hurricane Katrina relief effort.
--
Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.
Martin Fowler
T. : +32 (0)2 742 05 94
M. : +32 (0)497 44 68 12
@ : duvelbier-tsmets@yahoo.com
Do you skype too ... ?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Running a task between this hour and this hour
Posted by Ninju Bohra <ni...@yahoo.com>.
One way is to use the <tstamp> task with a custom pattern to contain only the hour (in 24hour format). Then using the <if> task (from the ant-contrib project) along with the a condition (like the <isLessThan> and <isGreaterThan> also from ant-contrib or write your own <isInBetween>) to control the setting of a property (called "isLateNight")
Do all the above in a depends target and protect the worker targets with if=isLateNight
I think that makes sense,
Ninju
duvelbier-tsmets@yahoo.com wrote:
Running the stats on our code is a rather lenghty process (currently +/-70 minutes)...
I therefore consider to run the targets only at night.
Would someone have an hint on how to evaluate the current time and set a flag if it is between say
: 10 PM and 6:00 AM ?
Tx,
\T,
--
Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.
Martin Fowler
T. : +32 (0)2 742 05 94
M. : +32 (0)497 44 68 12
@ : duvelbier-tsmets@yahoo.com
Do you skype too ... ?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.