Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Make Task Scheduler run a program after another closes?

19 Apr 2012   #21
silkman

Win7 x64
 
 

I have done the above bat file to change the active power scheme because with some programs the pc would go into standby.

Essentially you can put any number of programs one under the other by copying the 3 lines in tasklist. If *any* of the programs is running it goes to : progon and with powercfg -setactive you select an "always on" power scheme. When none of the programs are running, it goes to : progoff and runs another powercfg -setactive which resets the balanced power scheme with standby timers etc.

You put it into a task and run it every 10 minutes with system privileges so nothing shows to the user, no cmd popups etc...

Now to the question in hand. I'm tired of FF going bust at some point and losing my tabs where there is unfinished work, things to read etc. I want to run a batch file that everytime FF closes to back up sessionstore.js in FF profiles.

The batch is ready, however I need to know when FF closes and after maybe 5 seconds run the batch file *only once* - that's why the above method doesn't work....

Anyways aparently there;s a FF plugin that does this; it's called session manager. I just installed it; am not sure whether it works or not...


My System SpecsSystem Spec
.

19 Apr 2012   #22
lehnerus2000

Windows 7 Ultimate SP1 (64 bit), Linux Mint 17.1 MATE (64 bit)
 
 
Cmdow?

Quote   Quote: Originally Posted by silkman View Post
Now to the question in hand. I'm tired of FF going bust at some point and losing my tabs where there is unfinished work, things to read etc. I want to run a batch file that everytime FF closes to back up sessionstore.js in FF profiles.

The batch is ready, however I need to know when FF closes and after maybe 5 seconds run the batch file *only once* - that's why the above method doesn't work....

Anyways aparently there;s a FF plugin that does this; it's called session manager. I just installed it; am not sure whether it works or not...
When that FF problem occurs on my PC, FF doesn't close.
I can tell this, because the confirmation box in my script doesn't appear (it's waiting for FF to shutdown).
Killing FF, destroys my session (>95% of the time).
In my case, there would be no shutdown event.

I'm not sure when FF updates the session data (I assume it is during the shutdown).

Have you considered modifying your batch file, so that it backs up the sessionstore.js file at regular intervals?
I just checked my sessionstore.js file and it seems to update when a tab is opened or refreshed.

You'd have to edit the file to add some closing statements.
Copy the file before you start FF and then start FF and compare the 2 files to see what I mean.

Have you considered modifying your batch file, so that it backs up the sessionstore.js and sessionstore.bak files and then closes FF?
That is to say, use a batch file to close FF.

I found this info (it's from 2007 though)
Quote:
Cmdow.exe a really excellent command line tool for manipulating windows can do a normal close window command that could be used to cause firefox or any program to shutdown normally.
This would be a preferred method of shuting down firefox from the command line over the brute force kill method. Cmdow is a free program and can be downloaded from various sites. Its home site is in the UK I believe. Just google cmdow and you should be able to find it.
Here are some links:

CMDOW Commandline Window Utility for NT4/2000/XP/2003

cmdow.exe - What is cmdow.exe?
My System SpecsSystem Spec
Reply

 Make Task Scheduler run a program after another closes?




Thread Tools





Similar help and support threads
Thread Forum
How to use Task Scheduler to close a program?
Is there a way to use TS to close programs? I want a way to schedule times for certain programs to close. I already know how to use TS to shutdown the computer. Also, i'd prefer if no annoying messages popped up, like when I schedule a shutdown the computer pops up with "Your computer will...
General Discussion
How to make a shortcut to task scheduler
How can I make a shortcut to the Windows 7 Task Scheuler? I'm using it often and each time I go to Windows Help and search for task scheduler. Then click through the results several times before I get to the window showing my actual scheduled tasks. It would save tons of time, if you can...
General Discussion
Task scheduler program start minimized
Hello all, I just discovered the task scheduler and I am using it to start programs at logon, like eraser. The only problem is I would like to start them minimized and I can't quite figure out how to do that. I have set the program properties to run minimized but it doesn't want to play nice. Is...
Software
How to close/exit some program using Task Scheduler in Windows 7?
I want to turn on and off some backup programs to be automatically turned on and off at a set time instead of running in the background all the time and consuming memory. I know how to start any program using Windows Task Scheduler, but unable to find how to turn off the same program using it. ...
General Discussion
Task Scheduler - run program on wake
I simply want to run a program when the computer returns from standby, but I see no options in the scheduler. Help?
General Discussion
Task Scheduler Trigger @ Program shutdown
Hello, I would like a particular Task to run each time the Firefox application is closed, or, perhaps easier, each time my computer shutdowns. But I have no idea how to set up such Trigger. Have any of you an idea on how I should proceed? Thanks for the help.
Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 02:29.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App