Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 25, 2013, 08:14:18 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Extending scripts to run Slow Optimize based on age  (Read 661 times)
csalsa
JkDefrag Junior
**
Posts: 5


View Profile
« on: August 08, 2009, 01:20:07 am »

Hi

This approach could be solved by having two Windows Scheduled tasks.  But I thought to suggest if the scripts could be enhanced for this problem.

The enhancement would be:
1. On executing the main script, fetch the last time one or more scripts have been run (say from the Windows registry or local data file).  The last time 'fast update' and 'slow optimize' have been run.

2. The main script has rules, say if age of last run of a script, say 'slow optimize', is older than 'x' days, then run that script.

This requires storing and fetching of the datetime of last execution of a script, comparing age, and then being able to launch a script from within a script.

This has the advantage of scheduling one task (as already happens in the installer) and having the having the 'slow optimize' run every couple of weeks (as is suggested in the tips in the manual).

Would this be useful?
« Last Edit: August 08, 2009, 01:23:10 am by csalsa » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #1 on: August 08, 2009, 05:21:10 am »

2. The main script has rules, say if age of last run of a script, say 'slow optimize', is older than 'x' days, then run that script.
Thanks for sharing your idea, I appreciate it. Perhaps in the future I will add something like that, but at the moment I do not want to extend the MyDefrag scripting language into a full programming language, with things such as number calculations, string manipulations, if-then, while, goto, and many other things commonly found in programming languages.

Perhaps a tip: use your favorite programming language to do what you want, and then from that language call MyDefrag. Practically all programming languages have a facility to run other programs.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!