• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to schedule a Batch file (CMD) on Windows

AnonyViet by AnonyViet
January 30, 2023
in Tips
0

Batch files, also known as cmd files, are used to execute CMD commands with a pre-programmed file. If you want Windows to perform a certain task, within a certain time, set a schedule to run the Batch file and set a timer to automatically trigger the file to run automatically.

Join the channel Telegram of the AnonyViet 👉 Link 👈

How to schedule a Batch file (CMD) on Windows

Schedule batch file running in Windows with Task Scheduler

For example, you want to set a schedule to confess to batch files or activate virus batch file good to try other cool tricks on CMD. Please follow the instructions below:

After creating a batch file that automates a job, you’ll want it to run automatically at a certain time. The easiest way to do that is to use the Task Scheduler built into Windows. This is a tool that automatically runs a pre-scheduled job.

  1. Select Start menu and enter scheduler. The first result that appears will be Windows Task Scheduler.schedulerTask Scheduler will have many pre-scheduled tasks. Windows and other programs also use scheduled tasks.Task Scheduler will have many pre-scheduled tasks
  2. Create a new folder for your tasks for easy identification. Right click on Task Scheduler Library and choose New Folder… or choose New Folder in the table Actions on the right side.Task Scheduler Library
  3. Enter a name for the new folder. Naming has a little meaning.Enter a name for the new folder
  4. Right click on the new folder and select Create Task… or choose Create Task… in the table Actions.Create Task
  5. Windows Create Task will open tab General. Enter a meaningful name for the task in Name. In the section Description, write the task that this task does.
    Note the button Change User or Group. It will allow you to run the script under a different user. If your batch file requires Administrator rights, you should change the user to Administrator. It will ask you to enter the Administrator’s password.Change User or GroupAlso, note that the script will only run when the user is logged in (Run only when the user is logged on). You can change this setting to Run whether the user is logged in or not (Run whether user is logged on or not) if you want it to run at any time.
  6. Select tab Triggers (activated). Triggers is what determines when a task runs. Select new to create triggers.Triggers \
  7. There are many options in the window New Trigger. You can see what those options are.New Trigger
  8. In the section Begin the tasks Includes options:
    – On a schedule
    – At log on (At login)
    – At startup (At startup)
    – On idle
    – On an event (When an event occurs)
    – At task creation/modification (At task creation/modification)
    – On connection to user session (When connecting to user session)
    – On disconnect from user session (When disconnecting from user session)
    – On workstation lock (On locked machine)
    – On workstation unlock (On unlocked machine)
    On a schedule is the most common way and the one that I will use in this article.
  9. There are also options for scheduling Settings. Options include:
    – One time (once)
    – Daily (daily)
    – Weekly (weekly)
    – Monthly (monthly)
    I will choose Daily for this example.
  10. In Advanced settings, you can customize more parameters about how the task fires. This action is currently set to repeat every 5 minutes, indefinitely. Note that the box Enabled is selected by default. This is the first place to check when troubleshooting why a scheduled task isn’t running. Select OK when you’re done setting up.
  11. Select tab Actionsthen select new to indicate what the scheduled task will do.Actions
  12. In the menu Action: you have the following options:
    – Start a program
    – Send an email
    – Display a message.
    The last two options are not supported anymore. It’s best not to use them when you’re scheduling batch files. Leave it as default Start a program.Start a programEnter the full path to the script. Press Browse and select that command file.
    Items Add arguments and Start in fields will be empty. You can use them when moving to more complex scripts and tasks. You will definitely need these to schedule PowerShell scripts. Select OK to continue.
  13. The task is scheduled. Select OK to close the window and return to the Task Scheduler. Select the task you just created and test it. Right click on the task and select Run or choose Run in the table Actions.Run

When the quest is over, look at the column Last Run Result. You will see the text The operation completed successfully.

If it shows differently, try pressing the F5 button to refresh the screen. If it still says otherwise, the task you created probably failed.

The operation completed successfully

Learn about the Conditions and Settings tab?

There are two tabs that we did not discuss in the tutorial above. For most tasks, you don’t need to dig into these tabs. However, we still have to see what they contain.

Create Task – Conditions

These settings are related to the state of the computer. If the task takes up a lot of resources or can interrupt the person using it, change the Idle.

Create Task – Conditions

Part Power By default, only Start Task if the computer is on AC power (Start the task only if the computer is on AC power) and Stop if the computer switches to battery power (Stop if the computer switches to battery power) is enabled.

In most cases when you schedule batch files, you should be fine with the above options. I put some computers to sleep to save power when they are not in use. But if the computer is in sleep mode, the task will not run. If that’s the case, you’ll need to check the dialog box Wake the computer to run this task.

Wake the computer to run this task

Today, computers are almost always connected to the network. However, if your task depends on a network connection, change the Network.Network

Create Task – Settings

Tab Settings related to the operation of the task. By default, the Allow task runs on demand ( Allow task to be run on demand).

Some tasks may get stuck in a loop or not run because their trigger conditions are not met. These are the settings you will have to adjust to solve that problem. For most tasks, default settings are best.

Create Task – Settings

The article achieved: 5/5 – (100 votes)

Tags: BatchCMDfilescheduleWindows
Previous Post

Instructions to download Facebook Video with new interface 2021

Next Post

Share Code to upgrade Nhaccuatui VIP Account 2020

AnonyViet

AnonyViet

Related Posts

Instructions for receiving 1 month of ElevenLabs Creator for free worth
Tips

Instructions for receiving 1 month of ElevenLabs Creator for free worth $22

May 25, 2026
How to create beautiful studio-like preschool graduation photos for your child
Tips

How to create beautiful studio-like preschool graduation photos for your child

May 21, 2026
Instructions on how to change iPhone fonts beautifully with Lara
Tips

Instructions on how to change iPhone fonts beautifully with Lara

May 20, 2026
Create images of guardian mascots using AI according to year of birth
Tips

Create images of guardian mascots using AI according to year of birth

May 20, 2026
Try the Shopee Profit Calculator now, avoid the risk of selling at a loss
Tips

Try the Shopee Profit Calculator now, avoid the risk of selling at a loss

May 19, 2026
Prompt converts photos into extremely impressive children’s drawings
Tips

Prompt converts photos into extremely impressive children’s drawings

May 17, 2026
Next Post
Share Code to upgrade Nhaccuatui VIP Account 2020

Share Code to upgrade Nhaccuatui VIP Account 2020

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

Instructions for receiving 1 month of ElevenLabs Creator for free worth

Instructions for receiving 1 month of ElevenLabs Creator for free worth $22

May 25, 2026
Instructions on how to turn off YouTube Shorts on iPhone

Instructions on how to turn off YouTube Shorts on iPhone

May 24, 2026
Snapvie: Tool to download 8K YouTube videos, no installation required

Snapvie: Tool to download 8K YouTube videos, no installation required

May 24, 2026
How to create your own Video AI App to use Omni, Nano Banana without API Key

How to create your own Video AI App to use Omni, Nano Banana without API Key

May 23, 2026
Instructions for receiving 1 month of ElevenLabs Creator for free worth

Instructions for receiving 1 month of ElevenLabs Creator for free worth $22

May 25, 2026
Instructions on how to turn off YouTube Shorts on iPhone

Instructions on how to turn off YouTube Shorts on iPhone

May 24, 2026
Snapvie: Tool to download 8K YouTube videos, no installation required

Snapvie: Tool to download 8K YouTube videos, no installation required

May 24, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Instructions for receiving 1 month of ElevenLabs Creator for free worth

Instructions for receiving 1 month of ElevenLabs Creator for free worth $22

May 25, 2026
Instructions on how to turn off YouTube Shorts on iPhone

Instructions on how to turn off YouTube Shorts on iPhone

May 24, 2026
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply