Jump to content

TaskScheduler UDF _TS_ActionCreate fails on Windows 10


 Share

Recommended Posts

I am running Windows 10.

I downloaded TaskScheduler to a directory in my documents folder

I opened Scite as an Administrator

I modified TaskScheduler\Examples\_TS_ActionCreate.au3 so that it refers to  TaskScheduler\TaskScheduler

When I run it inside Scite I see

image.png.4641e88db0c4c165aa37c7d6825058a3.png

I have seen this before when I tried connecting to schtasks with the ObjCreate("Schedule.Service").

Now at least I can schedule a service with

 

Local $cmd = StringFormat("/create /tn  logger_%03d", $newHour)
    $cmd = $cmd & " /tr " & _
            "Logger04\tomsLogger.exe" & _
            " /sc once /st " & $schedTime
    Beep(500)
    beep(600)
    $Result = MsgBox($MB_YESNOCANCEL, "press no to not schedule next", "c:Windows\System32\schtasks.exe " & $cmd, 30)
    If ( $result = $IDNO ) Then
        return
    EndIf
    If ($Result = $IDCANCEL) Then
        MsgBox($MB_OK,"Canceling","canceled",2)
        exit
    EndIf
ConsoleWrite("schtasks " & $cmd & @CRLF)
ShellExecuteWait("c:Windows\System32\schtasks.exe", $cmd)

Some times the task name conflicts with an existing task, and the system will ask a Y/N question, that I must answer manually.

 

Thanks for your help.

I am trying to eliminate that question. I was hoping this UDF would help.

tbodine

Link to comment
Share on other sites

3 hours ago, tbodine88 said:

I modified TaskScheduler\Examples\_TS_ActionCreate.au3 so that it refers to  TaskScheduler\TaskScheduler

Shouldn't it be \TaskScheduler\TaskScheduler?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...