467,140 Members | 1,388 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,140 developers. It's quick & easy.

Scheduling a module to run

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
  • viewed: 2710
Share:
5 Replies
ADezii
Expert 8TB
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
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 8TB
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
  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 8TB
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.

Similar topics

4 posts views Thread by Gilles Leblanc | last post: by
6 posts views Thread by Tony Proctor | last post: by
3 posts views Thread by Alphonse Giambrone | last post: by
1 post views Thread by Majed | last post: by
4 posts views Thread by Dinsdale | last post: by
2 posts views Thread by kmdo | last post: by
Ritchie
2 posts views Thread by Ritchie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.