Task Scheduler arguments
I recently received an answer to a question I posted on this forum which advised me to create a basic task in the Task Scheduler. One of the steps was to put -t as the value in the argument field under the action tab. I was just wondering what this "-t" is, and what were some of the other "arguments". I looked on a few search engines and couldn't find out much more. Does anyone know where I can find a list of these arguments and what they do?
It was a basic task to run an application upon logon (a workaround for UAC on startup). Actually it was you who advised me to do so. It got me curious as to what the "-t" meant, and what were other "argument" options. Do you know where I can find a tutorial on these arguments, or at the very least a list?
The program is CPUID HWMonitor. There is nothing in front of the "-t". What I am looking for is a tutorial or resource which explains the different argument types and their functions. If "-t" can mean different things depending on the type of program, then I would be interested in knowing what it could mean in all instances.
"-t" doesn't mean anything "in all instances". For example, it will give an error if you try to use it with Notepad.exe. You can't apply it to just any old program - you can only use it with a program that understands it - and every program that understands it has a different meaning for it.
Are you referring to the page I linked to in the other thread which used "Afterburner"? If so, the "-t" would be specific to the "Afterburner" program. I haven't been able to find any documentation for the command-line options that Afterburner recognizes, so I have no idea what "-t" means for it.
If you've included "-t" to run your hardware monitor just because it was recommended for Afterburner then it's very likely that the hardware monitor is just ignoring it. Try editing the task and removing the "-t" option - chances are it will work just fine without it.
You, and by you I mean sminlal, told me on another post to use it. You explained that "-t" will do different things for different programs. What I mean by "in all instances" is that I am looking for information about the different argument types and what they are used for in different scenarios. For example, is their a "-g" or a "-s"? If so, what do they do (when applied to one type of a program, and then another). I am looking for some kind of resource, paper, list, tutorial etc. that explains how these things work.
Are you saying that every single program has their own unique list of arguments? If so, how does one go about finding out what these are for each program?
OK, I just edited my post while you were replying to it.
Yes, what I'm saying is that every program recognizes different arguments. For the command-line programs that are built into Windows, you can generally get a list of the arguments by opening up a Command Prompt window and typing the name of the program followed by "/?". For example, "PowerShell /?".
If you do the same thing for "Cmd /?" you'll see that the list of arguments is entirely different and they use "/" instead of "-" as the first character.
If the help information that came with a program doesn't show what the command line options are, you can often find them by doing a Google search for the name of the program followed by "command line" (in quotes).
jsanthara said:I recently received an answer to a question I posted on this forum which advised me to create a basic task in the Task Scheduler. One of the steps was to put -t as the value in the argument field under the action tab. I was just wondering what this "-t" is, and what were some of the other "arguments". I looked on a few search engines and couldn't find out much more. Does anyone know where I can find a list of these arguments and what they do?
Perhaps this post is too old and my reply is too late as you might have found the answer.
However I'd like to make my point on your question.
I've had the same question as you. And the answer is pretty simple: THERE ARE NOT predefined list about the arguments you can use with Task Scheduler, as it will use the same arguments you use for your script/program.
Example: if you want to ping several machines/servers (say 40 as an example) you would use this syntax in a command prompt: ping server-name -n 1
-n 1 will limit the amount of pings your computer will send to the target computer to 1, as the default is 4 pings.
Now. If you want that to be documented in a text file, you'll use: ping server-name -n 1 > C:\pingreply.txt
This will certainly works for 1 machine ONLY. Now how about the others 39 servers? Just write a batch file (.cmd or .bat) and name it with something like PingScript.bat as follows:
ping server1 -n 1
ping server2 -n 1
ping server3 -n 1
From a command-prompt you'll call this batch file like this: pingsrcipt.bat > C:\pingresults.txt
Now... ">" is an ARGUMENT that states to print out the output to C: and will name it as PINRESULTS.TXT
So.. having said that, the same argument is used within Task Scheduler, and no matter what user are you using for define the task, and also you can set the task for whether the user is logged or not (it's really up to you and what your needs are).
NOTE: when passing the argument into the task scheduler, you have to use the entire argument (not only the symbol). That means you need to use this syntax as an argument: > C:\pingresults.txt and you're done!