By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,455 Members | 2,157 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,455 IT Pros & Developers. It's quick & easy.

Scheduling a module to run

P: 33
Hey guys...
I want to schedule a module to run once every 3 months starting from set date, say August 1. Can I program a macro to run this module every 3 months? I know you could use the windows scheduler, but I would love to do this programmatically.
Jul 25 '08 #1
Share this Question
Share on Google+
5 Replies


ADezii
Expert 5K+
P: 8,597
Your best bet, in my opinion, would be to use a Scheduling Program in conjunction with the /x Command Line Access Option which will run a Macro. The following code will run Macro1 in Test.mdb in the C:\TestDir\ Directory. The timing of this Event would be controlled by the Scheduling Application.
Expand|Select|Wrap|Line Numbers
  1. "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\TestDir\Test.mdb" /x Macro1
Jul 26 '08 #2

P: 33
Your best bet, in my opinion, would be to use a Scheduling Program in conjunction with the /x Command Line Access Option which will run a Macro. The following code will run Macro1 in Test.mdb in the C:\TestDir\ Directory. The timing of this Event would be controlled by the Scheduling Application.
Expand|Select|Wrap|Line Numbers
  1. "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\TestDir\Test.mdb" /x Macro1
I havent used a scheduling program before. Could you be a little more in-depth, if possible outline the steps and how to access the scheduling program?

Thanks bud...you're a life saver.
Jul 28 '08 #3

ADezii
Expert 5K+
P: 8,597
I havent used a scheduling program before. Could you be a little more in-depth, if possible outline the steps and how to access the scheduling program?

Thanks bud...you're a life saver.
  1. Create a Batch File, and make sure it has the *.bat extension. It should look something like the following:
    Expand|Select|Wrap|Line Numbers
    1. @Echo Off
    2. cls
    3. "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\TestDir\Test.mdb" /x Macro1
    4. Exit
  2. In Windows XP
    1. Programs ==> Accessories ==>
    2. System Tools ==> Scheduled Tasks ==>
    3. Add Scheduled Task ==> Scheduled Task Wizard
    4. Browse ==> Select previously created Batch File
    5. Next
    6. Set the Timing Intervals on next 2 Screens
  3. Good luck, and let me know how you make out.
Jul 28 '08 #4

P: 33
  1. Create a Batch File, and make sure it has the *.bat extension. It should look something like the following:
    Expand|Select|Wrap|Line Numbers
    1. @Echo Off
    2. cls
    3. "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\TestDir\Test.mdb" /x Macro1
    4. Exit
  2. In Windows XP
    1. Programs ==> Accessories ==>
    2. System Tools ==> Scheduled Tasks ==>
    3. Add Scheduled Task ==> Scheduled Task Wizard
    4. Browse ==> Select previously created Batch File
    5. Next
    6. Set the Timing Intervals on next 2 Screens
  3. Good luck, and let me know how you make out.
Bud...
I am yet to try out the above. However before I proceed I have been wondering about something. Since this Database is going to be shared amongst users within a network, will the process still run even when my workstation is turned off? I may not be right, but I am of the impression that once I set up the scheduling on my workstation, my absence from work on a day the macro is supposed to be automated will fail. Am I right or am I just being paranoid?
Jul 29 '08 #5

ADezii
Expert 5K+
P: 8,597
Bud...
I am yet to try out the above. However before I proceed I have been wondering about something. Since this Database is going to be shared amongst users within a network, will the process still run even when my workstation is turned off? I may not be right, but I am of the impression that once I set up the scheduling on my workstation, my absence from work on a day the macro is supposed to be automated will fail. Am I right or am I just being paranoid?
Since this Database is going to be shared amongst users within a network, will the process still run even when my workstation is turned off?
A small point you should have mentioned from the beginning, no it will not run.
Jul 29 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.