During my nightly scheduled build I'm trying to get the project to save after I update some information in the project, so in the afteraction script event I use the SaveProject command. When I run it manually everything works correctly. But during the nightly build (using command line FBCMD.exe) the SaveProject doesn't seem to be actually saving the file.
Unfortunately, that function will not work from FBCMD - it relies on functionality which is only present in the IDE. I’ll change the function so that it errors out if you call it under FBCMD.
Also, this feature is old and really should be deprecated. What information are you saving? I’d earnestly suggest using one of the following methods to save data which changes between runs, instead of programatically changing the project file:
- Persistent variables - “Load variables from FBD” and “Save variables to FBD” - Ini file actions (load/save) - Property Sets
… If you let me know what information you need to save, I can give you some pointers on how to structure the process.
On the other hand, if SaveProject works for you then you can just change your schedules to use the IDE instead of FBCMD, and they will work fine.
I’m currently using the evaluation version, and have a related question about the command line version. I’ve got a test project scheduled to run once per day, and the scheduler shows that it did run, however, there’s no log data that reflects that activity. What is the recommended procedure for including the execution log from a scheduled command line run like this?
This usually indicates that a different log file is being used… or that the log file was not writable when run from the scheduler (file permissions, or read only). Also, I believe finalbuilder default’s to only keep the 4 most recent builds in the log history so it’s easy to assume nothing happened after 4 builds… you might want to change that if you are not worried about the disk space the log file takes (log files can get quite large, ours is around 1.5gb and has the last 100 builds).
Thanks for the reply, I found that there’s some arcane rules about variables used by FB that I didn’t understand, or missed in my reading of the documentation.
Specifically, that unless the variable already exists in either the environment or in the build process, that attempting to set it to a value on the FBCMD command line will cause the build to fail without creating a log file.
It takes sharp eyes ( or in my case, trying to run the constructed scheduler command line invocation from a shell) to catch this!