Advertise here: Contact FM.


Screensaver Scheduler
March 15, 2009 1:50 AM   RSS feed for this thread Subscribe

I want to only have my screensaver come on during certain parts of the day, but still want to have JKDefrag running.

I have an LG Flatron LCD screen, and I have just discovered Rainmeter. So now I have a big fat clock (the SUPERCOLOSSAL skin) sitting on my desktop, which I'd like to be able to see all day.

BUT previously, I've had my screensaver set up to be JKDefrag, with it powering down my monitor after 30 mins (so that if I fall asleep while watching a movie, the screen isn't on all night).

So - what I would like is for my screensaver/power saving only to be active during the night (between, say, midnight and 8am). I don't think I can use Task Scheduler for this, as if I'm still using my computer at midnight, then it'll interrupt me - and if I start using it after midnight, when I stop using it I want the screensaver to run.

This is less important than the point above, but I would also like JKDefrag to be able to run throughout the day (when I'm not using my computer). I know I could use Task Scheduler to set it to run when idle, but that seems messy. Could I run it in the background/hidden?

Thanks in advance
posted by edbyford to computers & internet (4 comments total) 1 user marked this as a favorite
you could just have a couple of scheduled tasks - one to enable the screensaver and one to disable which run at whatever time of day you want.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ScreenSaveActive"="0"

# Save the file to your desktop with the name Disable Screen Saver.reg.
# Change the 0 to a 1 in the fourth line.
# Save the file to your desktop with the name Enable Screen Saver.reg
posted by xla76 at 2:43 AM on March 15


Thanks for that - a very good idea. I'd still like to address the power saving issue though - I'd like the monitor to turn off during the night when it's not being used.

Also, is there a way to make JKDefrag run hidden?
posted by edbyford at 8:17 AM on March 15


I don't believe just changing the registry will work without informing the shell it has changed.

I would create the reg files as suggested, then two batch files like:

saver_on.bat:
reg import saver_on.reg
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters ,1 ,True

saver_off.bat:
reg import saver_off.reg
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters ,1 ,True


Then you can set up the scheduler to call the 'on' batch file at e.g. Midnight and the 'off' batch file at 7am. All this will do is enable the screen saver and start the timer if the system is idle. If you are using your computer actively it still won't trigger until the idle time has elapsed.


I really don't think running JKDefrag in the background during the day is necessary if you run it every night, but if you really want to, from the JKDefrag page:

Can I "hide" the program from users?
See the "How to start minimized, or maximized?" question. Running completely invisible is a bit more difficult. Create a special userid (for example "jkdefrag") with administrator permissions, then add a schedule to the Windows Task Scheduler (see the "How can I run JkDefrag automatically every day?" question) and specify that userid when asked for. The task will then run on that userid and not show anything on the user's screen. But I advise against it, I think it will needlessly worry the user when he sees a lot of mysterious disk activity.
posted by SpookyFish at 12:03 PM on March 15 [1 favorite has favorites]


Thanks for the help - unfortunately this doesn't work. I added a "pause" to the end of the two bat files to see the output, and while it says 'Operation completed successfully' and the lines execute fine, the screensaver still comes on.

Any suggestions how to fix this?
posted by edbyford at 5:40 AM on March 16


« Older Any survival tips for a non-Sp...   |   Has anyone had any experience ... Newer »

You are not logged in, either login or create an account to post comments