Jump to content
Sign in to follow this  

Task Scheduler Not Working to Run a Script

Recommended Posts

I tried to start Skype via Task Scheduler, but when it started, it only ran in the background. Then I made an AutoIt script to open the Start menu, type the path to Skype and press Enter. That also didn't work. The Task Schedular claimed the process started, but I didn't see anything happening.

After doing some research, I found out that the problem was that I selected the checkbox in Task Scheduler to run the task even when I'm not logged in. When you do that, Task Scheduler runs the task in the background, so you can't see the started program.

I didn't see anyone mention this on the forum, so I thought I'd mention this here.

Share this post

Link to post
Share on other sites

Is this related to AutoIt? Or a Task Scheduler UDF?

UDF List:

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post

Link to post
Share on other sites

I think he just wanted to write it down, like an encyclopedia

I was going to say that too but I wanted to see if he replied first :)

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By water
      Extensive library to control and manipulate Microsoft Task Scheduler Service.
      Please check this site for the implementation status! Please check the History.txt file in the archive for the changelog. Please check the WIKI for details about how to use the UDF.
      BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort
      KNOWN BUGS (last changed: 2020-03-01)
    • By snoopy.pa30
      I have a Windows 7 machine that is running a series of AutoIT 3 scripts from a master script. 
      When run manually, the entire set of scripts runs fine.  The scripts downloads data and do conversions and email results.
      When run from task scheduler, the  machine awakes and starts running the master script.  The first script runs fine, but the second part fails.  The first script is a simple call to an exe file that just runs.  The second script calls another exe file, but requires a few mouse clicks to run.  The further on scripts all run fine.
      When letting the script run from task scheduler (after being put to sleep) , if I move the mouse (or press a key), the login screen comes up (Strange, as No Password is set, and when machine boots, it comes straight into desktop).  If I click on the icon (no password) the scripts run fine.
      I am sure there is a setting somewhere that I have to set differently in task scheduler, or there is something in a W7 setting I need to change.
      My Task Scheduler quick tests are in the lines of: 
      Run only when user is logged on / Run whether user is logged on or not
      Run with Highest Privileges / or Not
      Configure for: (W7 / Vista / XP)
      Getting lost in the combinations, so will have to do a methodical series of tests, but hoping someone here might have some experience or suggestions.
      So, is it a Task Scheduler Setting (what combo) or a Windows 7 setting (what and where)?
      Any help or suggestion is appreciated.
      Thanks in Advance.
    • By timmy2
      My script is run by Task Scheduler at night. I want to leave a message for the user so he can see it the next day.  For users who remained logged in it's easy to leave a message on the screen, but that's impossible when the user is logged off when my task is run (my scripts runs fine; but no messages are displayed.  Is this due to something called "Session 0 Isolation"?)
      Is there a sure-fire way to detect if the system is sitting at the logon screen when my script is run by Task Scheduler?
      If my script knows it is running while the system is in this state it'll know what activities are impossible, like keyboard/mouse input, displaying messages, etc.
      (note Task Scheduler employs the user's credentials to run my script so checking for @username is of no help.)
    • By GreenCan
      This script will get all Scheduled tasks as defined on a system
      There are basically 3 functions in this small udf:
      _TaskGetFolders() will return an array of all folders as from a given Scheduler Library folder, recursively. $aFolders will have to be declared before the function is called, I am not sure if there is a better method to avoid having to declare the array outside of _TaskGetFolders()... _TaskListAllDetailed() will return a detailed array of all tasks in a given task folder, recursively. This function is using _TaskGetFolders() for the recurse option. _TaskListToText() will create a formatted output of scheduled tasks as returned to the above array. The script is complementary to taskplanerCOM.au3 by Allow2010.
      The example shows
      all folders in the Scheduler Library All scheduled tasks in root (with formatted output) All scheduled tasks on the system Scheduled tasks Windows Defender if available _TaskListAllDetailed.au3
  • Create New...