Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Automate Scheduled Taks

Featured Replies

Me again,

I have a scheduled task to run at 09:00 Monday - Friday

Say i have a day off and i dont want it to run is there a VB or a shortcut or something that i can click that will skip todays scanning and let it continue as normal the next day

Thanks


Someone might know how to change the next execution schedule of a job, but this works as well:

(So simple I'm allmost embarrased but I'm lazy and it works :-)

I usually make a temporary file, e.g. C:\temp\skipjob.flg or whatever, and make the scheduled program check if it exists. If it exists, delete it and exit. Next time it will run as normal. The schedule has not been changed, just the behaviour of the program.

Make a small script that justs creates this little "flag file" when you need it.

(Change your program to accept an argument, for example /skip, to tell it to create the flag and exit, if you don't want more scripts in your folder. )

If you want it to skip the job until you are back from a holiday, just check for existence, but don't remove the flag. Then you remove it when you are ready.

  • Author

Will this stop tasks that are in Windows own Scheduled Task Program?

Nah, this idea was not to stop the task starting, but to edit it, enabling it to exit without doing anything (skip), but yes, it works with scripts started from Task Scheduler. (The tasks I put in servers Task Scheduler is normally specialized batch programs or vbs/js scripts I create myself.)

This strategy gives you complete control over which tasks will run and which don't (skips), without having to change the Schedule Task properties programatically, which might be complicated. (You can use the AT command instead which is easy to control from batch programs, but lack the more advanced options)

Maybe you want to stop all tasks. You can do that by stopping the schedule service, which will of course stop all scheduled tasks while you are away.

The scheduler service is named slightly differently in different OS'es, but assuming XP:

net stop "Task Scheduler"

When you are back and want to resume the tasks,

net start "Task Scheduler"

So I have three strategies for you, depending on your needs:

To stop all tasks: stop the scheduler service temporarily

To stop not all, but just a few tasks in the form of editable scripts: Add the "skip once" strategy to the script(s) (no change in the schedules)

Or use the at command

:)

Edit:

Maybe it's not easy to use the at command from a script to change a schedule, but it's doable. You can't set next execution date, but knowing the ID of the job, you can delete the schedule, and you can have the script reschedule itself later.

You could find the current ID of a task by using FOR, AT and FIND. To stop the job with ID 1:

at 1 /delete

Edited by aquarius

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.