Windows 7 Forums


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

19 Apr 2012   #21

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

Windows 7 Ultimate SP1 (64 bit), Windows XP SP3, Linux Mint 14 MATE (64 bit)
Adelaide
 
 
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?

Last edited by lehnerus2000; 19 Apr 2012 at 07:48 PM.. Reason: Additional
My System SpecsSystem Spec
Reply

 Make Task Scheduler run a program after another closes? problems?



Thread Tools



Similar help and support threads for: Make Task Scheduler run a program after another closes?
Thread Forum
Task scheduler program start minimized Software
Solved How to close/exit some program using Task Scheduler in Windows 7? General Discussion
Task Scheduler - run program on wake General Discussion
How to Configure Task Scheduler to Run Program When Dial-up Connection Performance & Maintenance
Task Scheduler Trigger @ Program shutdown Performance & Maintenance


All times are GMT -5. The time now is 11:50 PM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

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
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32