Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-16-2005, 02:48 AM
jjanvier jjanvier is online now
Registered User
 
Join Date: 08-16-2005
Posts: 3
Schedule a buildstep on daily basis?

Hi,

Does someone know how to schedule a build-step/group on daily basis?
For example: every night we build debug & release version by setting a macro; we want to change this and start building debug only on one day in the week.
So I want to be able to set the debug-macro only on a specified day of the week.

Anybody knows how to set this within VBP?

Thnx in advance

Regards,
DJ
Reply With Quote
  #2  
Old 08-16-2005, 09:27 AM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
It sounds like you have scheduled a Visual Build Professional build to run daily and pass in a macro value to determine what gets built (currently both the release and debug configurations are built).

To conditionally build only the debug configuration, you could define a MACRO (that is passed in with the appropriate value) such as BUILD_DEBUG with a value of 1 or 0. Then define a conditional build rule on the step/group that builds the debug config. Something like "Build only if macro or expression" %BUILD_DEBUG% is true.

If you don't want to pass in a macro but have the build "compute" which day of the week it is, then you can use a script expression instead. You could define a conditional build rule like "Build only if macro or expression" [WeekDay(Date)] is equal to 3 or similar...

Actually in rereading your post, I guess you always want to build the debug config, but optionally build the release config. A slight modification of the suggestions will accomplish what you need...
Reply With Quote
  #3  
Old 08-17-2005, 05:54 AM
jjanvier jjanvier is online now
Registered User
 
Join Date: 08-16-2005
Posts: 3
Quote:
Originally posted by kevina

If you don't want to pass in a macro but have the build "compute" which day of the week it is, then you can use a script expression instead. You could define a conditional build rule like "Build only if macro or expression" [WeekDay(Date)] is equal to 3 or similar...
Hi Kevina,

Thank you for your reply.
My previous post might be unclear to what I meant.
I will re-explain: At night we build the same software twice(in debug mode and afterwards in release mode).
Because the project is now almost finished and the software is in sustaining, it is not necessary to build the debug mode; but I'm still responsible that the software would build in debug-mode without faults. So therefore I only want to build the software in debug-mode once a week.(release still will be build every night)
I'm using one buildscript in which I set a macro, which tells the buildscript whether to build in debug-mode or to build in release-mode.
I already implemented two macro's one for debug-mode and one for release-mode. Now I want to set a schedule on the macro of the debug-mode, so that it will be 'activated' only once a week.

Do you have more information or resource(where I can find the info) on computing which day of the week it is?
We are using VBP 5.3/5.5

Thnx in advance...
Regards,
DJ

Last edited by jjanvier; 08-17-2005 at 05:57 AM.
Reply With Quote
  #4  
Old 08-17-2005, 08:04 AM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
As I mentioned before, [WeekDay(Date)], is what you want. Just look up the vbscript WeekDay function, it will give a numeric value for the day of the week...

Or you could just use the Windows Scheduler to only run the build with the DEBUG macro set once a week (this is easy to do with the Windows Scheduler).
Reply With Quote
  #5  
Old 08-18-2005, 07:03 AM
jjanvier jjanvier is online now
Registered User
 
Join Date: 08-16-2005
Posts: 3
For everyone with a simular question; I did it like this:

Create a Run Script-step and insert the line below on the script-tab:

Application.Macros(vbldGlobal).Add "WEEKDAY_NUMBER", Weekday(Date)


After running this step there is a Global macro called WEEKDAY_NUMBER, which contains the number of the day(1 = sunday; 7 = saturday).
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 08:57 PM.


Copyright © 1999-2023 Kinook Software, Inc.