View Full Version : Schedule a buildstep on daily basis?
jjanvier
08-16-2005, 02:48 AM
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
kevina
08-16-2005, 09:27 AM
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...
jjanvier
08-17-2005, 05:54 AM
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
kevina
08-17-2005, 08:04 AM
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).
jjanvier
08-18-2005, 07:03 AM
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).
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.