I need to generate periodical reports as HTML files automatically from Job Scheduler. I use the -h parameter as command line parameter in the Job Scheduler program but the file I create one day gets overwritten the next day because I can’t seem to set up Job Scheduler with command line parameters to generate a unique file name for each day.
Is there a solution for this problem?
Yes, there is a solution. You must use a bat file containing DOS parameters to fetch the current date and insert it as the file name. There is an example of the syntax to be used in the bat file in the attached file called report.bat.txt which also includes an explanation of the parameters used. You may use this file after substituting your own paths and parameters. Remember to rename it by removing the .txt extension. Then insert a path to it as well as the path to the working folder where the HTML file is to be stored. See the graphic below as an example of how to set things up in Job Scheduler.