using autoexec macro and windows scheduled task to run queries

I use auto exec macro, module and windows scheduled tasks to run a query.
Now I want to run two more queries - each at a different time- is that possible?
Module1
Public Function startprog()
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryUpdate"
DoCmd.Quit acQuitSaveNone
End Function
Macro
AutoExec
(action) RUN CODE
function name

You can make 3 macros, setting 3 entries in the task scheduler,
or maybe set the queries after each other in 1 macro:
Public Function startprog()
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryUpdate1"
DoCmd.OpenQuery "qryUpdate2"
DoCmd.OpenQuery "qryUpdate3"
DoCmd.Quit acQuitSaveNone
End Function

Or you could use the scheduler to kick off the application at three different times, and let the application decide which query to run depending on the time.

If TimeValue(Now()) Between #01:30# AND #01:45# Then
docmd.Openquery "qryUpdate1"
Elseif TimeValue(Now()) Between #02:30# AND #02:45# Then
docmd.Openquery "qryUpdate2"
Elseif TimeValue(Now()) Between #03:30# AND #04:45# Then
docmd.Openquery "qryUpdate1"
endif

You could put this code in the Load event of your Startup form, rather than an autoexec macro (although I'm sure there are ways to do If/Then statements in macros, I've never felt the need to learn how).

PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…