Link to home
Start Free TrialLog in
Avatar of Pat Parigi
Pat ParigiFlag for United States of America

asked on

task scheduler windows 7

I want to use task scheduler to display a log file once a day.
how do i set task scheduler to display just today's file.

the folder has a new log file with that days date on it
and keeps the old log files in the folder.
Avatar of Steven Harris
Steven Harris
Flag of United States of America image

We may need some more information for this:

Are you checking by file name only, or just want the latest file in the folder?

How do you want to display it?  Are you using a specific program?
ASKER CERTIFIED SOLUTION
Avatar of Sasha Kranjac
Sasha Kranjac
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pat Parigi

ASKER

The program i am using Cobian Backup and its a txt log file.
 Cobian creates a new file once a day. I want the log file to open on the user display.
And yes I want the latest file to show in the folder
Did you try Sasa Kranjac's suggestion above?

First run the script to verify it works correctly in your scenario, then you can schedule the script to run via task scheduler.

For running PowerShell with Task Scheduler, try checking out the following EE Article.
The PowerShell script I suggested opens any last created file in the specified folder and opens it with an associated program. In your case these are .TXT files and should be opened (usually) with Notepad, although many applications can read and display textual files.

Test the PowerShell script, modify the code to open the files on target computers and save the script in a file.

Then go to Start, then System and Security, open Administrative Tools. Double-click on Task Scheduler.

On the left pane, click on Task Scheduler Library. In the right pane, in the blank area below scheduled tasks, right-click and choose either Create Basic Task... or Create New Task...
Either way, when prompted for a Program/Script to schedule, point to your PowerShell script and fine-tune the scheduler to your needs.
Don't forget to test the script and the Task.

Check the Task by setting time of execution couple of minutes from the time you are creating the task so you don't have to wait until tomorrow to see if it works.
Thanks for the fast answer.