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
Solved

Scheduled Task (Server 2008) trigger on file create

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Title # Comments Views Activity
How to replace corrupted spoolersv 7 93
Could not intialize the Java virtual machine 5 64
Reset Log Generation 3 22
Send data from a cell phone to a pc 5 51
This article covers how to install the Microsoft Windows Operating System (OS). What is covered in this article:  > Different Versions and Editions of the Windows OS  > Upgrading versus Fresh Installation of the OS           - Steps to take pr…
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…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

856 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