?
Solved

Scheduled Task (Server 2008) trigger on file create

Posted on 2012-03-17
6
Medium Priority
?
2,576 Views
Last Modified: 2014-04-12
Need to create a Sceduled Task, which trigger on a file create in a folder.
I'll then run a Powershell-script looping all files and do some processing.
Any idea ?
0
Comment
Question by:matemat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 37

Assisted Solution

by:Neil Russell
Neil Russell earned 1000 total points
ID: 37732421
A scheduled task runs on a schedule NOT on a file being created, thats not a schedule.

You would need to write a script that monitors the folder for the creation of the file and have it run 24/7 looping the check.
0
 

Author Comment

by:matemat
ID: 37733069
Ok, let me rephrase then :-)
I'm wondering if it is possible to use "Task Scheduler" to perform such a job for me ?
Not triggering on Schedule, but "on an event".
0
 
LVL 82

Expert Comment

by:David Johnson, CD, MVP
ID: 37735750
The first answer is correct you will need the process to run continuously
0
 
LVL 8

Accepted Solution

by:
Brent Challis earned 1000 total points
ID: 37736053
A better approach would be to use the FileSystemWatcher from the .NET Framework as this means that the system itself will monitor the directory and call code in terms of new/updated/deleted files.

Here is a reference for the use of the FileSystemWatcher in PowerShell:
http://gallery.technet.microsoft.com/scriptcenter/Powershell-FileSystemWatche-dfd7084b
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had a hard drive that you can't boot into, but need to change the registry? Here is the solution! This article guides you through accessing and editing a registry of a non-primary drive. To read registry information on a non-prim…
INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question