[Lazarus] Which program type to select for cron usage?

Michael Van Canneyt michael at freepascal.org
Mon Oct 19 12:28:55 CEST 2015



On Mon, 19 Oct 2015, Bo Berglund wrote:

> I am finally ready to start creating my FPC/Lazarus control
> application based on a number of Delphi support units. The application
> is meant to be started on a Raspberry Pi2 by cron every minute or so
> and basically check if there is something to do and if not just exit.
> But if there is stuff to do it will create the needed control objects
> and start communicating with a data collection instrument to manage
> its measuring sequence.
> As far as I am concerned the program will have no user interface
> whatever but it will need to be running on command from cron and it
> must also detect if it has already started (some hints on this has
> been given in earlier threads).
> Anyway, Lazarus gives a number of non-GUI selections for the new
> project:
>
> 1) Simple Program (A most simple FP command line program)
> 2) Program (A FP cmd line program with some useful settings added)
> 3) Console App (A FP cmd line program using TCustomApplication..)
>
> I will probably need to use threads inside the program so I guess that
> 2 or 3 would be the appropriate selection.
> Is there something else that may affect the decision?
> And what is the best selection between Program and Console
> Application?

1 is suitable for small quick programs.

For anything that has a longer lifetime and is likely to change over the years, 
you should pick 3.

Michael.




More information about the Lazarus mailing list