Turning on a special program at special time and turning off the computer at another special time

I decided to write a program in RUBY wherein these items have been done
:

1 - this program must at special time ( for example 1pm ) run a special
program ( for example utorrent ). 2 - this program at another special
time must turning off my computer.

I don't any idea about the algorithm and manner of writing such program.
please help me to write this program.
thanks every body.

**My operating system is Windows7 but if it can be potable , it's very
good!.**

···

--
Posted via http://www.ruby-forum.com/.

That sounds like a program a special program a terrorist would write. Are
you a special terrorist? Why the overuse of the word special.

···

On Sep 21, 2011 7:01 AM, "amir e." <aef1370@gmail.com> wrote:

I decided to write a program in RUBY wherein these items have been done
:

1 - this program must at special time ( for example 1pm ) run a special
program ( for example utorrent ). 2 - this program at another special
time must turning off my computer.

I don't any idea about the algorithm and manner of writing such program.
please help me to write this program.
thanks every body.

**My operating system is Windows7 but if it can be potable , it's very
good!.**

--
Posted via http://www.ruby-forum.com/\.

On Windows I would write a simple shell script and schedule it via
"scheduled tasks". You can shutdown the computer via command line
program "shutdown".

C:\>shutdown /?
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t
xx] [-c "comment"] [-d up:xx:yy]

        No args Display this message (same as -?)
        -i Display GUI interface, must be the first option
        -l Log off (cannot be used with -m option)
        -s Shutdown the computer
        -r Shutdown and restart the computer
        -a Abort a system shutdown
        -m \\computername Remote computer to shutdown/restart/abort
        -t xx Set timeout for shutdown to xx seconds
        -c "comment" Shutdown comment (maximum of 127 characters)
        -f Forces running applications to close
without warning
        -d [u][p]:xx:yy The reason code for the shutdown
                                u is the user code
                                p is a planned shutdown code
                                xx is the major reason code (positive
integer less than 256)
                                yy is the minor reason code (positive
integer less than 65536)

C:\>

Kind regards

robert

···

On Wed, Sep 21, 2011 at 2:00 PM, amir e. <aef1370@gmail.com> wrote:

I decided to write a program in RUBY wherein these items have been done
:

1 - this program must at special time ( for example 1pm ) run a special
program ( for example utorrent ). 2 - this program at another special
time must turning off my computer.

I don't any idea about the algorithm and manner of writing such program.
please help me to write this program.
thanks every body.

**My operating system is Windows7 but if it can be potable , it's very
good!.**

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Here how i think it should be:

1. The code needs to be run from windows 7 scheduled tasks at a specific
task.

2. The code will be multi-threaded so it can run external commands using
exec or something similar.

3. Check the external program you want to run it from ruby, can you
control it by passing commands to it ? eg: bittorent -x -h

4. The ruby code checks the current time to a predefined "shutdown"
time-value, if they match it can shut down the computer by running an
external task eg: "shutdown"

Thats all i guess.

···

--
Posted via http://www.ruby-forum.com/.

Whoa. Inappropriate.

Ben

···

On Wed, Sep 21, 2011 at 9:01 AM, andrew mcelroy <sophrinix@gmail.com> wrote:

That sounds like a program a special program a terrorist would write. Are
you a special terrorist? Why the overuse of the word special.

Robert Klemme wrote in post #1023099:

....
Kind regards

robert

Thanks robert but I want to write a RUBY program that do it.

···

--
Posted via http://www.ruby-forum.com/\.

Andrew Mcelroy wrote in post #1023092:

That sounds like a program a special program a terrorist would write.
Are
you a special terrorist? Why the overuse of the word special.

Hey " Andrew Mcelroy "
If you don't have any thing to do , I think you aren't forced , come to
this site and write your rancid bullshit so please shut your filth mouth
and go away from this site and never come back.

···

--
Posted via http://www.ruby-forum.com/\.

I just have to comment on this one...

I'm new here, and new to programming. I happened to find ruby once night
while studying and researching programming languages.
And also because an old employer of mine is using the Ruby programming
language.

I am learning a lot from all the posts. I believe we are all trying to learn
from each other.
I have found Andrew's comment absurd and out of line. I am hoping this is
not a common occurrence.
So far I have not seen any comments like this one.

Andrew - I know I probably cannot change your mind or make you think
differently however here it goes...
just because someone's name looks like Muslim does not mean that they are
Muslim.
There are many people who do not go by their Muslim name, So you might not
even know you are speaking to a Muslim.
And there are many people who live in Arab countries who are not Muslim but
have Arab names because that's where they live.

···

On Wed, Sep 21, 2011 at 6:01 AM, andrew mcelroy <sophrinix@gmail.com> wrote:

That sounds like a program a special program a terrorist would write. Are
you a special terrorist? Why the overuse of the word special.
On Sep 21, 2011 7:01 AM, "amir e." <aef1370@gmail.com> wrote:
> I decided to write a program in RUBY wherein these items have been done
> :
>
> 1 - this program must at special time ( for example 1pm ) run a special
> program ( for example utorrent ). 2 - this program at another special
> time must turning off my computer.
>
> I don't any idea about the algorithm and manner of writing such program.
> please help me to write this program.
> thanks every body.
>
>
> **My operating system is Windows7 but if it can be potable , it's very
> good!.**
>
> --
> Posted via http://www.ruby-forum.com/\.
>

That sounds like a program a special program a terrorist would write. Are
you a special terrorist? Why the overuse of the word special.

Clearly not serious here... just saying.

Whoa. Inappropriate.

poe's law strikes again.

Andrew McElroy.

···

On Wed, Sep 21, 2011 at 8:20 AM, Ben Bleything <ben@bleything.net> wrote:

On Wed, Sep 21, 2011 at 9:01 AM, andrew mcelroy <sophrinix@gmail.com> wrote:

Ben

Andrew Mcelroy wrote in post #1023092:
> That sounds like a program a special program a terrorist would write.
> Are
> you a special terrorist? Why the overuse of the word special.

Hey " Andrew Mcelroy "
If you don't have any thing to do , I think you aren't forced , come to
this site and write your rancid bullshit so please shut your filth mouth
and go away from this site and never come back.

Im sorry you were offended.
Ill be sure to include sarcasm tags in the future.

Andrew

···

On Sep 21, 2011 5:27 PM, "amir e." <aef1370@gmail.com> wrote:

--
Posted via http://www.ruby-forum.com/\.

I just have to comment on this one...

I'm new here, and new to programming. I happened to find ruby once night
while studying and researching programming languages.
And also because an old employer of mine is using the Ruby programming
language.

I am learning a lot from all the posts. I believe we are all trying to

learn

from each other.
I have found Andrew's comment absurd and out of line. I am hoping this is
not a common occurrence.
So far I have not seen any comments like this one.

Andrew - I know I probably cannot change your mind or make you think
differently however here it goes...
just because someone's name looks like Muslim does not mean that they are
Muslim.

It was a bad joke in poor taste.
I was being hyperbolic.
Btw there have been plenty of non Muslim terrorists. Look at Timmothy mcvey
in the 90s.

Clearly just a white guy.

I wasn't paying any attention to the name when I made that joke. Asking how
to start and stop bit torrent sounded like malware code the way it was
asked.

The name had absolutely nothing to do with the joke. Period.

Can we all please get over the butt hurt?
I already said I'm sorry.

Andrew

There are many people who do not go by their Muslim name, So you might not
even know you are speaking to a Muslim.
And there are many people who live in Arab countries who are not Muslim

but

have Arab names because that's where they live.

> That sounds like a program a special program a terrorist would write.

Are

> you a special terrorist? Why the overuse of the word special.
> > I decided to write a program in RUBY wherein these items have been

done

> > :
> >
> > 1 - this program must at special time ( for example 1pm ) run a

special

> > program ( for example utorrent ). 2 - this program at another special
> > time must turning off my computer.
> >
> > I don't any idea about the algorithm and manner of writing such

program.

···

On Sep 22, 2011 12:49 AM, "cathy alomari" <cathy1428@gmail.com> wrote:

On Wed, Sep 21, 2011 at 6:01 AM, andrew mcelroy <sophrinix@gmail.com> wrote:
> On Sep 21, 2011 7:01 AM, "amir e." <aef1370@gmail.com> wrote:
> > please help me to write this program.
> > thanks every body.
> >
> >
> > **My operating system is Windows7 but if it can be potable , it's very
> > good!.**
> >
> > --
> > Posted via http://www.ruby-forum.com/\.
> >
>