In the following example, a batch file will be created which runs a macro. The macro will create a spreadsheet object, open, and save the spreadsheet to the desktop location. An additional steps will be setup to have Windows run this periodically.
CREATE AND NAME THE MACRO1 Using the Ribbon Bar, select the 'Home' tab.
2. In the File section, select New | Macro.
3. Add the following SVB code in the Main procedure:
Dim ss As Spreadsheet
Set ss = Spreadsheets.Open(Path & "\Examples\Datasets\Poverty.sta",False)
ss.SaveAs("c:\users\username\desktop\output.sta", True)

4. In the File section select Save | Save As and name the macro.
Note: Other examples can be found in the Online Help (for Statistica 12 and later, from the Ribbon Bar, select the File tab, then click Help/Support).
CREATE AND NAME THE BATCH FILE1. Open Notepad and enter the following command:
"C:\Program Files\StatSoft\STATISTICA 12\statist.exe" /u "admin" /w "abcdef" /runmacro="C:\users\username\desktop\SaveSheet.svb" /nologo
Note: See
Statistica Enterprise Command Line Options (148965) for command line options and explanations.
2. Save and name the file adding a .bat file as the extension:

3. Double-click the batch file icon to run the batch file
4. The output.sta file be created and saved on the Desktop location:
SETUP WINDOWS TASK SCHEDULER
1. Click Start | Control Panel | Administrative Tools | Task Scheduler
2. In the Actions section, select 'Create Basic Task...' to begin the wizard. Enter the name and click 'Next':

3. Select when the task is to start and click 'Next':

4. Select the trigger options and click 'Next':

5. Select 'Start a program' as the Action and click 'Next':

6. Browse to the batch file and click 'Next':

7. Click 'Finish' to complete the wizard: