Can you do this in XOJO?

I want a timer to go off every morning at say, 06:00
If it is the first day of a month
run the report
else
go back to sleep
end if

For a timer iin xojo, configure it to fire every 60 seconds and check the values for Day and Hour.

https://docs.xojo.com/Timer
https://docs.xojo.com/DateTime.Day
https://docs.xojo.com/DateTime.Hour

Yes… What i would suggest creating an app the get automated start when teh machine boots (to deal with restarts) and to save the last time the report is run…

That way if the computer is not running for any reason at 6AM on the first day of the month, when the machine is restarted it will immediately run the report.

-Karen

a cron job set to run at 6 am the first day of every month that starts an app you choose
or maybe a calendar event that runs at 6 am the first day of the month that just starts the app
(you can have an event start an app by opening the file or a script)

and that app simply runs and runs the report

will probably be way less CPU doing nothing all the time and quite accurate and will easily obey day light savings time changes etc

HOWEVER, be aware that IF a user is not logged in at the time it may limit what you can do quite a bit

2 Likes

Thank you all for your input
Problem solved and tested