Browsing articles tagged with "scheduledtask - Admins Goodies"
May 2, 2013
tom

Task Scheduler: Login to a session at startup and start a desktop app?

ISSUE: I have a Windows 2008 R2 VM that runs a 3rd party ERP system. They have a utility that will run scheduled jobs to backup the Oracle database and their app data nightly with a 7 day rotation. The problem is that it must run as a desktop app interactively within a session. It can’t run as a service. While I’m not thrilled about leaving an account logged in, I’ve learned to allow it. […]

Continue Reading »
Nov 26, 2012
tom

Win7 scheduled task minute settings?

I must process a bat file for every minute but win7 scheduled task not allow per minute. Lowest 5 minutes. Can I set scheduled task win7 for per minute? Asked by prestack You can set it to every minute. In the advanced properties just edit the “5 minutes” field and change the number. (It is not only a drop-down selection box, but also an editable field.) You can even set it to 10 seconds if […]

Continue Reading »
Nov 18, 2012
tom

Scheduled Tasks and Environment Variables

I have a scheduled task, a batch file, that uses an environment variables which is set system-wide. On server 1, the scheduled task runs under a domain account and the environment variable works. The environment variable also exists in my session and when I runas as the service account. On server 2, the scheduled task runs under a different domain account and the environment variable DOES NOT work. However, the environment variable does exist in […]

Continue Reading »
Oct 20, 2012
tom

Ok to edit task’s xml file in c:\windows\system32\Tasks?

I wrote a PowerShell script that check the executable in the < action > tag for each task in the Task directory and mark the < enabled >TRUEorFALSE< / enabled > tag as false/true depending on the validity of the digital signature of the executable. After reading each task, the script re-saves the task file with the same name, type and location. Now my issue is that I get this message when I lunch task […]

Continue Reading »
Sep 18, 2012
tom

Scheduled task running twice from time to time

A customer of mine is experiencing a very strange problem: a scheduled task is running twice from time to time, with only a few seconds between execution. The task is scheduled using the windows scheduler. It’s a very basic task that connects to a local service using TCP/IP, authenticate, gives it a command and disconnect. It is nearly instantaneous (the longest part actually is the SSL handshake). It triggers an issue in the server application […]

Continue Reading »
Jun 29, 2012
tom

How do I schedule a task to run every hour indefinitely on Server 2003

I am moving a scheduled task from a Windows 7 machine to a Windows Server 2003 machine. On Windows 7 I can configure my task to run every hour indefinitely by setting up a custom trigger like so: On Windows Server 2003, I assume I need to use the advanced schedule options, and I have got this far: Whether I choose duration or time, my task seems to have an expiry date, how do I […]

Continue Reading »
May 10, 2012
tom

Powershell script works from command line, not from task scheduler. Why?

This is driving me crazy! My powershell script works from the command line, but not from task scheduler. This is Powershell v1 on Server 2008 R2 Enterprise. From the command line, I type: c:\> powershell -File “C:\Program Files\mystuff\foo.ps1″ My one-line powershell script runs fine — it copies the most recent file named *.bak. Here’s the script, in case that’s useful: gci X:\backups\*.bak | Sort-Object LastWriteTime -Descending | Select-Object -first 1 | foreach { xcopy $_ […]

Continue Reading »
May 2, 2012
tom

Add a new scheduled task from command line with “wake the computer to run this task” on

I’m trying to add a scheduled task to start every day at a fixed hour even if the computer is in sleep mode. In the Windows Scheduled Tasks Manager UI, there is a check-box labeled “Wake the computer to run this task”. How can I set this option with schtasks in cli? The OS is Windows XP Pro. My command right now is: schtasks /create /tn “asdf” /tr asdf.cmd /sc DAILY /st 23:00:00 /ru System […]

Continue Reading »
Apr 30, 2012
tom

Schedule windows command with at

What will be the parameter to schedule a program in Windows with the at command to run from Th-Sa, 3am, on even days ? Asked by PeterMmm I would make a PowerShell script as a “container”: 2 options here. You can specify all the “even dates” and check then in a script if today is in the range Th-Sa. at 03:00 /every:2,4,6,8,10,12,14,16,18,20,22,24,26,28,30 “myscript.ps1″ Or, you check in your script wether or not your day is […]

Continue Reading »
Apr 22, 2012
tom

Windows Scheduled Task – Error 2147943711 for “on startup” task

I have a onstartup task that I want to automatically run, regardless of if someone is logged in or not. I’ve set it up as Run whether user is logged in or not, Do not store password1, and Run with highest privileges, which I assume would work, using the below code: schtasks /create /tn “My OnStartup Task” /TR “powershell blah.ps1″ /sc ONSTART /f /NP /RL HIGHEST After enabling task scheduler history, I’m getting errors like: […]

Continue Reading »
Pages:1234567...13»