Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Activate a perl script with a screen saver?

by dorp (Novice)
on Jun 20, 2001 at 02:43 UTC ( [id://89855]=perlquestion: print w/replies, xml ) Need Help??

dorp has asked for the wisdom of the Perl Monks concerning the following question:

I've got a massively parallel number crunching problem. I have a perl script that runs on several machines throughout the company overnight to work on this problem. (Perl calls the number-crunching executable in a shared directory and shuffles the data around.) Does anyone know of a way to make screen-savers trigger the execution of such a script? This is on an NT platform, Activeperl.
  • Comment on Activate a perl script with a screen saver?

Replies are listed 'Best First'.
Re: Activate a perl script with a screen saver?
by bikeNomad (Priest) on Jun 20, 2001 at 02:48 UTC
    The problem with a screen saver is that you have to somehow suspend its operation when someone moves the mouse. If you have some way to remotely suspend and continue these scripts, why not just run them (and suspend them) from the scheduler that's already built into NT?

    If you have the memory, you could also start up the processes using the IDLE priority class and just leave them going. Users wouldn't notice any interference, other than the memory would be reduced.

Re: Activate a perl script with a screen saver?
by the_slycer (Chaplain) on Jun 20, 2001 at 09:03 UTC
    Another alternative would be to use perl2exe to so-called compile your perl program into an executable.

    I hear a lot of "so, what good does that do in this case"
    The fact is that Windows (at least NT and 2k) will run an exe as a screen saver, as long as the exe has been renamed to a .scr extension.

    Really, give it a try, rename a copy of cmd.exe to ssmyscreen.scr and hit the screensaver tab of display properties. This is actually pretty scary behaviour. Just for fun one time, rename login.scr to login.old and cmd.exe to login.scr, logout and wait ;->
Re: Activate a perl script with a screen saver?
by furn (Sexton) on Jun 20, 2001 at 07:46 UTC
    In principle you could build your perl project into an activeX object with the ActiveState toolkit and then include that in a VD or VC++ project (sample code for VB screen savers are pretty common).
Re: Activate a perl script with a screen saver?
by John M. Dlugosz (Monsignor) on Jun 21, 2001 at 01:19 UTC
    It seems to me that Perl is not the language for a massive number crunching problem. Why not have Perl parse out the values and then feed a C or FORTRAN subroutine to do the crunching? It might speed it up so much you don't need to go to so much trouble.

    I like the idea of just running it at a very low priority. Don't bother with the screensaver; just let it start pulling when the computer has nothing better to do.

    —John

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://89855]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-19 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found