Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

For the Wiki (Windows Task Scheduler)

Discussion of the Cumulusutils tool and website generator.

Moderator: HansR

Post Reply
nossis
Posts: 95
Joined: Wed 28 Nov 2012 6:12 am
Weather Station: Davis Vantage Pro 2
Operating System: Win 10
Location: Perth AU
Contact:

For the Wiki (Windows Task Scheduler)

Post by nossis »

Hi Hans,

Wrote a part for the wiki article for the Cutils page
https://www.cumuluswiki.org/a/CumulusUtils
Specifically the Scheduled task
Hope that it is sufficient for your needs?
Not sure of the best default switch or rather command to use in the bathc file, as I don't use it in it's native manner, guessed website?


How to create a scheduled task
Prior to doing this we need to also create the script that the task will use.
  1. Open notepad or your favourite text editor (encourage the use Notepad++)
  2. Can copy paste the below and save as cumulusutils.bat
    (Can be a filename of choice but must have extension of .bat, if using windows notepad, underneath the File name: option, will need to set Save as type: option to All Files (*.*). This way when the File name: is set as cumulusutils.bat it will save it as that and not cumulusutils.bat.txt)
Batch file code of cumulusutils.bat
(Lines that begin with REM are provided for explanation purposes and can be removed)

Code: Select all

	REM This batch file script checks for the process CumulusMX.exe is running, if yes, then runs the "cumulusutils.exe", otherwise exit
	
	REM Set the current working session to the folder C:\CumulusMX
	cd\
	cd C:\CumulusMX
	
	REM Check for CumulusMX.exe is running, if yes goto :runutils, otherwise goto :end
	tasklist /FI "IMAGENAME eq CumulusMX.exe" 2>NUL | find /I /N "CumulusMX.exe">NUL
	if "%ERRORLEVEL%"=="0" GOTO runutils
	GOTO end
	
	REM Set as working directory C:\CumulusMX and run cumulusutils.exe in folder C:\CumulusMX\utils\bin, with the desired command or commands as per the wiki
	:runutils
	START /D C:\CumulusMX C:\CumulusMX\utils\bin\cumulusutils.exe Website
	
	:end
	exit
Task creation process
Within the Task Scheduler Library
  1. Create “New Task…” (actions pane), or right click middle pane and choose “Create New Task” (not Create Basic Task).
  2. On the General tab of the new task (General information about the task).
    1. Set desired name for the Task (Example name CumulusUtils, can also set description if desired).
    2. Click “Change User or Group…”.
    3. Type in here the word system (click on “Check Names” if desired, to confirm it is correct and it should then display as SYSTEM in capitals).
    4. Click OK to use this user account.
    5. Note in Security options part of the new task creation process it should now state under.
      When running the task, use the following user account:
      NT AUTHORITY\SYSTEM
      (Convenient reason for this is that when the task runs, it runs is running as system account and so is not seen popping up on screen when it is running.)
    6. “Configure for:” not required to be changed, can be changed to version of operating system.
  3. On the Triggers tab of the new task (Setting when and how often the task runs).
    1. Click on “New”, to create a new launch time and frequency of the task.
    2. Begin the task: option should default to “On a schedule”, this is the desired option.
    3. Under the settings section choose “Daily” option.
    4. Start: date can be left as is, set the desired start time of the task. Set to “12:00:15 am”.
      (Reason for this setting with 15 second delay is trying not to compete with CumulusMX upload tasks).
    5. In the advanced part, enable Repeat task every: and choose desired interval.
      With the option for a duration of: default setting of “1 day” is used.
    6. Set Stop task if it runs longer than: to “30 minutes” (if the task runs longer than the time set, it is stopped. This applies to the individually triggered task, and not the overall routine of this scheduled task, with it’s repeating trigger times).
    7. Confirm that the Enabled options is ticked to make active this trigger routine.
  4. On the Actions tab (Setting what the task is to do).
    1. Click on “New…” to create a new action.
    2. Action: should default to “Start a program” this is correct.
    3. In the Program/Script: part, type the path to the program to run, or click “Browse” to navigate and select the program to run. (example C:\CumulusMX\batch_files\cumulusutils.bat).
  5. On the Conditions tab (setting other conditions).
    1. Under Power, untick Start the task only if the computer us on AC power
      (This then enables the task to start and run even if on battery. It will automatically untick Stop if the computers switches to batter power.)
  6. On the Settings tab (additional other settings for the task).
    1. Confirm ticked for Allow task to be run on demand.
    2. By default Stop the task if it runs longer than: is already ticket and set as 3 days.Change to 1 hour (the behaviour here is the same as instruction 3.f.)
    3. Confirm ticked for If the running ask does not end when requested, for it to stop.
    4. Default setting of “Do not start a new instance” Is OK.
  7. Click on OK down the bottom to complete and commit the creation of this new task.
Customisation
One can also customise/fine tune the task further by exporting it, default export format is XML. Then can edit in favourite text editor and reimport when done. May be useful in particular for fine tuning the repetition times of the task.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: For the Wiki (Windows Task Scheduler)

Post by HansR »

nossis wrote: Tue 16 Jan 2024 10:47 am Wrote a part for the wiki article for the Cutils page
https://www.cumuluswiki.org/a/CumulusUtils
Specifically the Scheduled task
Hope that it is sufficient for your needs?
Not sure of the best default switch or rather command to use in the bathc file, as I don't use it in it's native manner, guessed website?

[...]
Hi Barry,

Thanks, highly appreciated.

I'll copy this to the Windows Scheduler section on the CumulusUtils page.

Wrt the command to use for CUtils, I'll make an additional note on that, including the thrifty. You can't spell it out explicitly, but the mechanism on what and how to do it is very clear.

Thanks again!

Cheers,
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
Post Reply