Results 1 to 6 of 6

Thread: How to execute commands of batch file at timed intervals

  1. #1
    Join Date
    Dec 2009
    Posts
    80

    How to execute commands of batch file at timed intervals

    I am using an acer aspire desktop installed with windows 7. I need to know how to execute commands of batch file at timed intervals. Because i want to execute certain commands after a certain interval of time this will. Have anybody needed this ever before i would really appreciate your help in this matter.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: How to execute commands of batch file at timed intervals

    Yes this is possible but it would have been somewhat more better if you have also posted the program so that i can implement on that program and could have posted the solution but i am unable to give you a solution without the codes. I will do the needful as soon as you post the bat file commands.

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: How to execute commands of batch file at timed intervals

    For this you will have to make use of a loop and then execute the batch file it would be better if you also make use of the 'dir' command after about 30 seconds. Since this dir command is used very extensively when a user wants to run certain command at a certain time intervals hope you got the point.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How to execute commands of batch file at timed intervals

    To perceive this i will suggest you to make use of the scheduled task. Since using the scheduled task you can repeat certain number of commands at frequent intervals. So simply go to the start menu and then click programs and select accessories and select the scheduled task. double click the add scheduled tab.

  5. #5
    Join Date
    May 2008
    Posts
    2,389

    Re: How to execute commands of batch file at timed intervals

    I think you will have to place the batch file in to a loop and then execute the dir command after every 25 secs. This will help you to execute certain command after a certain interval of time. If you are not getting it still then try to concentrate on the program mentioned below.

    • START
    • REM (this will execute the MS-DOS dir after every 25 seconds)
    • dir
    • SLEEP 25
    • GOTO END

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    Re: How to execute commands of batch file at timed intervals

    I would like to give you an example which will help you to understand how to implement such programs try to go through the program below.

    :run_batch
    taskkill avg.exe
    REM
    sleep 30 (will pause the process for 30 seconds)
    goto run_batch

    I hope that this would have solved all your issue.

Similar Threads

  1. Multiple commands for a batch file in a for loop?
    By SANDESH49 in forum Software Development
    Replies: 4
    Last Post: 08-05-2012, 10:40 AM
  2. Execute a batch file on a remote computer?
    By Chris D in forum Windows Server Help
    Replies: 6
    Last Post: 20-01-2011, 11:09 PM
  3. Batch File Commands
    By Pratap Gad in forum Operating Systems
    Replies: 3
    Last Post: 30-07-2009, 08:07 PM
  4. Execute a batch file on remote host
    By Hulicat in forum Windows Server Help
    Replies: 5
    Last Post: 20-06-2009, 01:35 AM
  5. Batch File to Refresh Network at regular intervals
    By Baker in forum Networking & Security
    Replies: 3
    Last Post: 17-04-2009, 10:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,662,269.67227 seconds with 17 queries