Hello Paul,

Am trying to run excel from task scheduler which as macro in it here I need
to run task scheduler from 10:00 AM  - 6:00 PM(except weekends)

At present I have scheduled it from task scheduler and its working fine
what I need is it should run from 10:00 AM - 6:00 PM only.


Regards,

Chandrashekar B

On Wed, Oct 21, 2015 at 4:48 PM, Paul Schreiner <schreiner_p...@att.net>
wrote:

> Yes there are.
> Without knowing what it is you are trying to do, it's a little difficult
> to describe.
>
> Have you already created a Scheduled Task in the Scheduler?
>
> What is the name of the program you're running?
>
> The first step is to use a text editor (like NotePad)
> to create a .bat file with the entry like I described previously:
>
> TestTask.bat:
> -----------------------------
> schtasks /delete /tn "Release ADTL"  /f
> schtasks /create /tn "Release ADTL"
>          /tr "C:\WINNT\system32\wscript.exe c:\temp\Release-ADTL.vbs ALL"
>          /sc hourly
>          /st 8:00:00
>
> (yours will be different)
>
> Run that .bat file and see if it creates the Scheduled Task correctly.
>
> Once you have this .bat file working properly, then we can work on writing
> the VBA that creates and runs this bat file.
>
> *Paul*
> -----------------------------------------
>
>
>
>
>
>
>
> *“Do all the good you can,By all the means you can,In all the ways you
> can,In all the places you can,At all the times you can,To all the people
> you can,As long as ever you can.” - John Wesley*
> -----------------------------------------
>
> ------------------------------
> *From:* Chandra Shekar <chandrashekarb....@gmail.com>
> *To:* excel-macros@googlegroups.com
> *Sent:* Tuesday, October 20, 2015 11:49 PM
>
> *Subject:* Re: $$Excel-Macros$$ Task Scheduler
>
> Hello,
>
> Okay. Is there steps to do it?
>
>
> Regards,
>
> Chandru
>
>
>
> On Tue, Oct 20, 2015 at 5:13 PM, Paul Schreiner <schreiner_p...@att.net>
> wrote:
>
> It's the same Task Scheduler.
>
> Basically, the Operating System has an application that handles scheduled
> tasks.
>
> Windows has an application that serves as an INTERFACE to the task handler.
>
> There is a CMD interface called schtasks that also serves as an interface
> to the same task handler.
>
> If you use a .bat file and schtasks as described below,
> it will make an entry that you can view and modify in the Windows Task
> Scheduler.
>
> So, you can use VBA to create and run a .bat file that can make or change
> entries to the Task Scheduler.
>
>
>
> *Paul*
> -----------------------------------------
>
>
>
>
>
>
>
> *“Do all the good you can,By all the means you can,In all the ways you
> can,In all the places you can,At all the times you can,To all the people
> you can,As long as ever you can.” - John Wesley*
> -----------------------------------------
>
> ------------------------------
> *From:* Chandra Shekar <chandrashekarb....@gmail.com>
> *To:* excel-macros@googlegroups.com
> *Sent:* Tuesday, October 20, 2015 2:55 AM
> *Subject:* Re: $$Excel-Macros$$ Task Scheduler
>
> Hi,
>
> Need to schedule through WIndows Task Scheduler.
> Control Panel\All Control Panel Items\Administrative Tools\Task Scheduler
>
>
> Regards,
>
> Chandru
>
>
>
> On Mon, Oct 19, 2015 at 4:18 PM, Paul Schreiner <schreiner_p...@att.net>
> wrote:
>
> Are you saying that you want VBA to schedule a task?
>
> In the past, I created a userform in Excel to create a Scheduled Task.
> (Our Windows Profile had the task Scheduler locked out)
>
> The VBA macro made use of the "command line" for creating scheduled tasks:
> schtasks /create /tn <TaskName>
>                  /tr <TaskRun>
>                  /sc weekly [/mo {1 - 52}]
>                 [/d {<MON - SUN>[,MON - SUN...] | *}]
>                 [/st <HH:MM>]
>                 [/sd <StartDate>]
>                 [/ed <EndDate>]
>                 [/it]
>                 [/ru {[<Domain>\]<User>
>                 [/rp <Password>] | System}]
>                 [/s <Computer>
>                 [/u [<Domain>\]<User>
>                 [/p <Password>]]]
>
> for instance, I have a vbscript that runs hourly to check for files in a
> specific folder to move to a "released" folder.
>
> schtasks /delete /tn "Release ADTL"  /f
> schtasks /create /tn "Release ADTL"
>          /tr "C:\WINNT\system32\wscript.exe c:\temp\Release-ADTL.vbs ALL"
>          /sc hourly
>          /st 8:00:00
>
> In my VBA, I create the schtasks command line and write it to a .bat file
> (I called it C:\temp\create_task.bat)
>
> Then, I used:
> stat = Shell("C:\temp\create_task.bat") to execute the .bat file.
>
> I think to stop your program at a specific time you could use:
>
> schtasks /end <TaskName>
>
> I'm sure you can google some examples.
>
> *Paul*
> -----------------------------------------
>
>
>
>
>
>
>
> *“Do all the good you can,By all the means you can,In all the ways you
> can,In all the places you can,At all the times you can,To all the people
> you can,As long as ever you can.” - John Wesley*
> -----------------------------------------
>
> ------------------------------
> *From:* Chandra Shekar <chandrashekarb....@gmail.com>
> *To:* excel-macros@googlegroups.com
> *Sent:* Sunday, October 18, 2015 11:51 PM
> *Subject:* $$Excel-Macros$$ Task Scheduler
>
> Hello,
>
> Is it possible to schedule task in windows which will oepn at 10 AM and
> ends at 6:00 PM(Office working hours) but not using onkey in VBA.
>
>
> Regards,
>
> Chandru
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to