Solved

Scheduled Task (Server 2008) trigger on file create

Posted on 2012-03-17
6
1,694 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
Comment Utility
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
Comment Utility
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 78

Expert Comment

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

Accepted Solution

by:
bchallis earned 250 total points
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bios password 8 31
Register DLL's in Windows 7 3 24
Will DB Backup's  cleanup job will cause Paging ? 6 22
Exchange 2013 CU6 to CU7 4 28
Introduction: I have always been a big fan of Windows but my liking towards it is slowly being eroded by the variety of other Applications that I encounter, when I browse the Web. Most of the software available is free and maybe Open Source too. …
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…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now