Solved

Scheduled Task (Server 2008) trigger on file create

Posted on 2012-03-17
6
2,174 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 250 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 80

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 250 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
File Types Dropdown box 3 39
screensaver group policy 2 44
How to covert a batch file into a Powershell Script 6 92
Windows 2012 KMS Server Trial Key 5 279
This article describes how to set permissions to allow a limited-permissions user to start and stop a particular System Service.   It is always best to give users only the permissions that they need to perform their job, so tweaking particular permi…
This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
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…

749 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