You need to know the correct command line to close the particular program
you have in mind. Consult the program's documentation or the vendor's
technical support. Once you have the correct command line, you simply
schedule it as you would any other task.
Tom Swift