You are not logged in.

#1 16 Nov 2020 00:03

ShellExplorer
New Member
Registered: 15 Nov 2020
Posts: 2

How to schedule Weekly batch process, starting at a specific time?

Hi,

Using a command line similar to this one:


    SCHTASKS /CREATE /SC WEEKLY /D MON /TN "\Tasks\WeeklyReports" /TR c:\WeeklyReports\Generate_Weekly_Reports.bat" /ST 07:00

, the Windows Task Scheduler inserts the task.  But instead of being scheduled for 7 am, it schedules it for the same time that it was inserted.  So if I run the above command, at 5 pm, then the scheduler sets it to run for Monday weekly, at 5 pm, not 7 am.

How can I tell the Schedule that it has to be for a specific time?


Regards,

Offline

#2 16 Nov 2020 00:57

Simon Sheppard
Admin
Registered: 27 Aug 2005
Posts: 1,130
Website

Re: How to schedule Weekly batch process, starting at a specific time?

Your example has an unmatched quotation mark after .bat, that's probably enough to confuse SCHTASKS

Offline

#3 16 Nov 2020 01:11

ShellExplorer
New Member
Registered: 15 Nov 2020
Posts: 2

Re: How to schedule Weekly batch process, starting at a specific time?

That's the answer.  I just tried it with the missing quote, and it's fine.

Thanks and regards,



Simon Sheppard wrote:

Your example has an unmatched quotation mark after .bat, that's probably enough to confuse SCHTASKS

Offline

Board footer

Powered by