TASK SCHEDULE IN WINDOWS 2008 R2
Dear All, I have created task schedule and select Run Whether user is logged on or not. But after select this option i noticed in task manager that my application runs successfully but when it attracts with win word and create folder in D drive of server at that point it fails. .e.g:. Satiation is i have printer server application which open win word and create folder and then create win word documents in that folder automatically. When i use this option (Run Whether user is logged on or not ) i task schedule it only creates folder and do not create win word documents. Thanks Adeel ImtiazAdeel Imtiaz
July 17th, 2012 6:36am

Would you detailed your question? Thanks Milos
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2012 7:12am

how to run task schedule in Interactive mode by using Run Whether user is logged on or not option.Adeel Imtiaz
July 17th, 2012 8:24am

You can't have an interactive task if you're not logged in. I think you should review the script that's doing the work to see where the problem lays. No reason you should have to make it interactive to accomplish your task.
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2012 8:42am

Let me rephrase my issue. I have Print Server Application which prints my reports in windows document. It is EXE based application. In Windows 2008 R2 I create Task Schedule of print application select basics tasks and create one simple schedule with administrator login Schedule runs I can see the application GUI. Application created folder in D drive and there are win word documents in it. This is successfully. Problem is when I select below option with my Domain account it creates folder but do not write any win word documents. Adeel Imtiaz
July 17th, 2012 9:31am

Hmm... I want to say it's a permissions issue but if it's creating the folders then that's not it. Just out of curiosity is your 'imtiaza' account in any admin groups? If not may want to try that just to see what happens. Are there any errors in event viewer?
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2012 10:15am

imtiaza has admin rights .... Can you please guide me to create task with interactive mode. Adeel Imtiaz
July 18th, 2012 1:28am

It should run interactively when you select 'Run only when user is logged on'. Are you using UAC? If so you need to 'Run with highest privileges'.
Free Windows Admin Tool Kit Click here and download it now
July 18th, 2012 7:40am

The Task Scheduler in Windows Server 2008 R2 replaces the Scheduled Tasks tool that was literally unchanged since the release of Windows 98. The main focal point of the tool is to assist administrators by automating tasks. In addition, by consolidating standard and reoccurring tasks into a central location, administrators gain insight into system functionality and control over their Windows Server 2008 R2 infrastructure through automation. These things together assist administrators in the areas of logging and debugging. Windows Server 2008 R2 improves upon the previous version of the Scheduled Task tools included in Windows Server 2003 by allowing scheduled jobs to run more securely and with greater predictability. One of the most compelling new features of the Task Scheduler is that it fully integrates with Event Viewer. As such, a task can be triggered based on an event captured in the event log. This is a great feature because administrators can be automatically notified when a specific event transpires. Understanding Task Scheduler Scheduling tasks involves triggers and actions. A task runs once it is triggered. Tasks are initiated by triggers that are based on an event or time. Multiple triggers can be associated with a task as defined by an administrator. An action represents the work being performed as the task is being executed. Examples of actions include starting a program or sending an email. When a task is running multiple actions, up to 32 can be performed. An additional functionality is task conditions. When a task is triggered, it will only run if specific defined conditions are met. Task conditions eliminate ambiguous situations by providing criteria-based functions. By improving on the Task Schedulers functionality, it has become a very powerful and extensive development and activation tool for automating and assisting with troubleshooting tasks. With Windows Server 2008 R2, Task Scheduler has been moved from Control Panel to Administrative Tools. The new user interface is displayed in Figure 1. <center> Figure 1. The Task Scheduler user interface. </center> Tasks are created by selecting Create Basic Task, Create Task, or Import Task from the Actions pane in the Task Scheduler snap-in. When creating a task, there are five tabs of options that must be configured. They include general settings, triggers, actions, conditions, and additional settings. The upcoming sections explain the options when creating tasks. Understanding Trigger Options and Settings The first thing to consider when configuring a task is what triggers will cause the task to execute. Triggers can be based on time, events, or various system states. As noted earlier, each task can contain multiple triggers. With more than one trigger, the task will launch when any of the conditions in any of the triggers is met. The following describes the various trigger types and the settings that can be configured for each type: On a Schedule Triggers for a schedule allow tasks to run on a specific date (one time), Daily, Weekly, or Monthly. For reoccurring tasks, the start time can be configured along with reoccurring options to completely customize when the task will run. At Log On Tasks scheduled to run when At Log On is set for any user or for a specific user or group of users. At Startup There are no specific settings for tasks configured to run at startup. This type of trigger runs whenever the system starts and the only settings are the advanced ones, which are described later in the chapter. On Idle The settings for tasks set to run when the computer is idle are set on the Conditions tab. On an Event This trigger causes a task to run when specific events are created in an event log. You can choose either a basic event trigger or custom event settings. Basic settings fire based on a single event from a specific event log. You choose which log contains the event, the publisher name, and the event ID. If you specify the custom event trigger settings, you can specify an XML event query or custom event filter to query for events that will fire the task. At Task Creation/Modification Tasks created with this trigger are fired as soon as they are created or whenever they are modified. The only settings for this trigger are the advanced settings as described in the next section, Understanding the Advanced Settings Associated with Triggers. On Connection to User Session The trigger fires when a user connects to the system using the Remote Desktop Connection program from another system and can be set to run when any user connects, or when a specific user or group connects to the server. On Disconnect from User Session This trigger works the same as the On Connection to User Session; however, it fires when users disconnect from the server from a Remote Desktop Connection session. The trigger can be set to run for all users or a specific user or group. On Workstation Lock The trigger fires when the workstation is locked. The settings for this trigger enable you to set it for all users or a specific user or group. On Workstation Unlock This trigger fires when the workstation is unlocked. The settings for this trigger enable you to set it for all users or a specific user or group. Understanding the Advanced Settings Associated with Triggers Advanced settings exist when creating triggers. Familiarize yourself with these advanced settings to ensure trigger creation and the workflow process is fully optimized. The following bullets explain each of the advanced settings associated with triggers: Delay Task for or Delay Task for Up To (Random Delay) Tasks can be delayed randomly so that they do not start immediately when the schedule triggers a task. For systems that might run the same tasks, this ensures there is some load balancing and that all systems do not run tasks at exactly the same time. Random delays can be set for 30 seconds, 1 minute, 30 minutes, 1 hour, 8 hours, or up to 1 day. Repeat Task Every Tasks can also be set to repeat at regular intervals and for a set duration (for example, a task could be set to ping a particular system every minute for 1 day, write an event to the event log in the case of a failure, and email a distribution group to notify the IT team about the issue). Stop Any Task If It Runs Longer Than Tasks can be stopped if they run past a defined amount of time and can be set to expire at a certain date and time. Start and Expire Start and Expiration times can be set to synchronize across time zones to ensure tasks set to run on systems in multiple time zones start and stop at the same time. Enabled Tasks can be enabled or disabled by checking or unchecking the enabled box. Understanding the Actions Associated with a Task As mentioned earlier, an action is the work conducted when a task runs. Tasks can have a single action or up to a maximum of 32 actions. The Actions tab of a task contains a list of actions associated with a particular task. An administrator can edit each action as follows: Start a Program This action starts a program or script. In the Program/Script text box, type either the name of the program or script that should be run. Alternatively, the administrator can browse the application or script. If further command-line arguments are required, these can be specified in the Add Arguments (Optional) text box. In the Start In (Optional) text box, the working directory can be specified for the command line that executes the program or script. This path is either the path to the program or script or to the files that are used by the executable. Send an E-mail This action sends an email when the task is triggered. In the Edit Action dialog box, you enter who the email is from, who it should be sent to, a subject, and any desired text. You must also enter a valid SMTP server. Display a Message This action simply displays a message on the console of the system where the task is created. You can enter a title for the message as well as any text that should be displayed. This type of action only launches if the Run Only If User Is Logged On security option has been selected on the General tab of the Task Properties in the Create Task dialog box. Understanding Conditions Associated with a Task Conditions in conjunction with triggers determine whether the task will run. Tasks will not run if any condition associated with a given task is not fulfilled. The following sections illustrate the types of conditions associated with a task: Idle Conditions A trigger can be based on idle time of a computer. Idle time is checked by the Task Scheduler service every 15 minutes. Computers are idle if a screensaver is running. When a screensaver is not running, the computer is considered to be idle if for 15 minutes the CPU usage and disk input or output were at 0% for 90% of the overall time. In this situation, mouse or keyboard input should also be nil during this period of time. The Task Scheduler service only waits for user input to mark the end of an idle state. Power Conditions Administrators can specify that tasks run only on computers operating on AC power. If administrators do not want a task to run when a computer is on battery power, a condition must be set to stop the task. Also, if the computer is off, a condition can be set to awaken the computer from a Sleep or Hibernate mode so the task can run. Although this is unlikely in a server environment, its still an option. Network Conditions Administrators can choose to start a task only if a specified network connection is available. This setting is appropriate if the action requires access to a remote system or network. Note The Network Conditions do not support interoperability with Windows 2000 or XP. Understanding Task Settings The Settings tab of the Tasks Properties or Create Task dialog box offers settings that help you control how the task is run, restarted, stopped, or deleted, as follows: Allow Task to Be Run on Demand If selected, this setting enables the administrator to manually start the task regardless of triggers or conditions by selecting the tasks and clicking Run in the Actions pane or right-clicking the task and selecting Run from the context menu. Run Task as Soon as Possible After a Scheduled Start Is Missed If this option is selected, a task that has been scheduled to start at a specific time but did not run (for example, the computer was off or the scheduler service was busy) will be started, but only after 10 minutes has elapsed from the original start time. If the Task Fails, Restart Every This setting controls what to do when a task does not run (for example, if a task fails to start a service due to an undetermined system problem). If this option is selected, an administrator can also configure the number of attempts that should be made to initiate the task. If the Running Task Does Not End When Requested, Force It to Stop If a task does not respond to a request to stop, an administrator can set a condition to force it to stop. Stop the Task If It Runs Longer Than If this item is checked, a limit on how long the task can run is enforced. As a result of this setting, a task might not be completed when it is stopped. If the Task Is Not Scheduled to Run Again, Delete It After This selection helps the administrator keep the Task Scheduler MMC free from old tasks that might have been put in place to accomplish a specific action but are no longer needed or will never be repeated. Note that a trigger must contain an expiration task. If the Task Is Already Running: Do Not Start a New Instance The task will not start a new instance if an instance of the task is already running. If the Task Is Already Running: Run a New Instance in Parallel A new task will run in parallel if one instance is running and the triggers and conditions cause the task to be triggered again. If the Task Is Already Running: Queue a New Instance A new task will queue, but it will not start until the first instance is complete and will not stop the instance that is already running. If the Task Is Already Running: Stop the Existing Instance A new task is triggered and conditions specified in the task will first stop the current instance and then start a new instance of the task. Understanding Task History The History tab on the properties page for a task contains events filtered from the Operational events for the Task Scheduler in the Event Viewer and enables an administrator to see success and failures for any given task without having to review all task-related event information for a system or collection of systems. Note Although the Task Scheduler enables an administrator to create folders for organizing tasks and new tasks can be given meaningful names, after a folder or task is created, it cannot be renamed. Further, tasks cannot be moved from one folder to another. However, tasks can be exported and then imported into a new folder or another system.
July 18th, 2012 9:52am

I am not using UAC. but i have tried with Run with highest privileges'. still no issue... Is there any Batch user involved interactive batch user..?Adeel Imtiaz
Free Windows Admin Tool Kit Click here and download it now
July 18th, 2012 10:15am

Give user Log on as a batch job permissions and see if that works. On the server in question, Run -> secpol.msc <enter> I do not represent the organisation I work for, all the opinions expressed here are my own. This posting is provided "AS IS" with no warranties or guarantees and confers no rights. - .... .- -. -.- ... --..-- ... .- -. - --- ... ....
July 18th, 2012 10:24am

Done Santosh but no progress.... folder has been created with this option i can see the WINWORD process in task manager print server process in task manager but there is no WINWORD files in that folder...Adeel Imtiaz
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 9:31am

Adeel Bhai, Not sure how helpful it will be but worth giving a try Try adding the user in 'Act as part...' and 'Create Glo...' I do not represent the organisation I work for, all the opinions expressed here are my own. This posting is provided "AS IS" with no warranties or guarantees and confers no rights. - .... .- -. -.- ... --..-- ... .- -. - --- ... ....
July 19th, 2012 10:16am

Dear Santosh, Same problem yaar. can i have GTM session. Thanks AdeelAdeel Imtiaz
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2012 1:16am

Hi Malik, Instead of specifying output in D drive, try C drive and see what happens.Don't be a prick ! Be reasonable and provide your feedback. Say something whether the suggestion was helpful or not, mark a reply as answer or click on to vote helpful if any suggestion really helps you, don't leave that choice to moderators, let the credit go to a contributor who has invested his precious time on your questions. Please be informed that, moderators are also humans and they also make mistakes ;-) Last but not the least, Unmark as answer if any post doesn't answer your question/s !!!
July 20th, 2012 1:55am

Hi Being Human, I have tried this also visa versa complete rights on C drive then i change drive in application and make it on D drive. same result. Actually with second option in task schedule (Run Whether user is logged on or not.) application calls win-word i can see it on task manager but when application writes some data on win word after that winword files get saved on d drive folder. Here with 2nd option (Run Whether user is logged on or not.) i am unable to see WINWORD files at folder but requried folder creates successfully. Adeel Imtiaz
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2012 2:34am

Strange ! Which application do you use to print your reports in word format ? It appears that, application has some restrictions due to which this issue occurs. Have you tried contacting the vendor ? Don't be a prick ! Be reasonable and provide your feedback. Say something whether the suggestion was helpful or not, mark a reply as answer or click on to vote helpful if any suggestion really helps you, don't leave that choice to moderators, let the credit go to a contributor who has invested his precious time on your questions. Please be informed that, moderators are also humans and they also make mistakes ;-) Last but not the least, Unmark as answer if any post doesn't answer your question/s !!!
July 20th, 2012 2:44am

Hi Being Human, We have develop the application in PowerBuilder. Same application with red arrow option works find create folder then create winword files. you can see in above pictures. But with 2nd option which is mentioned with GREEN arrow. Only folder creates but no winword files in that folder. i can see the winword process in task manager. Thanks adeel ItmiazAdeel Imtiaz
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2012 3:33am

I am out of ideas ! Please check the similar discussion below , that may help in troubleshooting this issue further Task Scheduler Problem (run whether user is logged on or not) http://social.technet.microsoft.com/Forums/en/w7itprogeneral/thread/c03d6691-b058-4f8d-961c-e8eba25bbaedDon't be a prick ! Be reasonable and provide your feedback. Say something whether the suggestion was helpful or not, mark a reply as answer or click on to vote helpful if any suggestion really helps you, don't leave that choice to moderators, let the credit go to a contributor who has invested his precious time on your questions. Please be informed that, moderators are also humans and they also make mistakes ;-) Last but not the least, Unmark as answer if any post doesn't answer your question/s !!!
July 20th, 2012 4:56am

Malik Adeel Imtiaz In your code, are you useing UNC to name your file and path \\server\share\path\Mydoc.docx or are you using non UNC, like c:\mypath\mydoc.docx? Try UNC.
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2012 8:57am

try using UNC pathing for your word files
July 20th, 2012 8:59am

Spyder2000 can you please elaborate how can i set the UNC ?Adeel Imtiaz
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2012 9:08am

Dear Santosh, Same problem yaar. can i have GTM session. Thanks Adeel Adeel Imtiaz Sorry, I was on vacation hence, couldn't respond earlier. I am also clueless what else to look at or suggest. By the way, UNC path would look like : \\servername\Drive\directory I do not represent the organisation I work for, all the opinions expressed here are my own. This posting is provided "AS IS" with no warranties or guarantees and confers no rights. - .... .- -. -.- ... --..-- ... .- -. - --- ... ....
July 23rd, 2012 2:46am

Dear All, Problem has been resolved. Server Details:- 1) Windows 2008 R2 2) Set Task Schedule with NETWORK SERVICES. 3) And then try again . Sure by the grace of God problem will be resolved. SPECIAL THANKS TO SANTOSH, Spyder2000 , Being Human, Fuat Ceylan , Frank Albanese and Milos Puchta. Best Regards Adeel Imtiaz adeel.imtiaz@netsoltech.comAdeel Imtiaz
Free Windows Admin Tool Kit Click here and download it now
August 8th, 2012 4:04am

Good to hear that Adeel. Thanks for sharing the information on this forum, it sure will help someone who would have similar issues.I do not represent the organisation I work for, all the opinions expressed here are my own. This posting is provided "AS IS" with no warranties or guarantees and confers no rights. - .... .- -. -.- ... --..-- ... .- -. - --- ... ....
August 8th, 2012 4:10am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics