Is there a way to turn on several PC at the same time? a solution like "leaver and restone trick"? because when I start my SMP server, I have to start again all the pc, and I dont want to forgot to start some "important" pc in my factory. Maybe a peripherical?
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Automated Computer startup
Started by francogp, 22 March 2012 - 01:57 AMPosted 22 March 2012 - 02:57 AM
Hi,
Is there a way to turn on several PC at the same time? a solution like "leaver and restone trick"? because when I start my SMP server, I have to start again all the pc, and I dont want to forgot to start some "important" pc in my factory. Maybe a peripherical?
Is there a way to turn on several PC at the same time? a solution like "leaver and restone trick"? because when I start my SMP server, I have to start again all the pc, and I dont want to forgot to start some "important" pc in my factory. Maybe a peripherical?
Posted 22 March 2012 - 05:46 AM
If you name a program "startup" inside the root directory of the computer it will run that program everytime the computer starts up.
Posted 22 March 2012 - 05:55 AM
See this post. http://www.computerc...er-from-inputs/
I'm not sure if its doable or not but you would probably have to set something up like what was described to do what you are wanting.
When I get to a computer where I can play around with it some I'll see if I cant get something working.
I'm not sure if its doable or not but you would probably have to set something up like what was described to do what you are wanting.
When I get to a computer where I can play around with it some I'll see if I cant get something working.
Posted 22 March 2012 - 06:11 AM
If you name a program "startup" inside the root directory of the computer it will run that program everytime the computer starts up.
What I need is to turn on a lot of computers at once, not a program (i edit the original post to avoid future misunderstood).
See this post. http://www.computerc...er-from-inputs/
I'm not sure if its doable or not but you would probably have to set something up like what was described to do what you are wanting.
When I get to a computer where I can play around with it some I'll see if I cant get something working.
Thanks!
PD: If with one computer I cant turn on all the others via "wake on lan" style, it would be great! (I will a suggestion thread with this)
Posted 22 March 2012 - 12:03 PM
I don't know if this works for multiplayer, but in SSP the laste on/off state of the computer is remembered.What I need is to turn on a lot of computers at once, not a program (i edit the original post to avoid future misunderstood).If you name a program "startup" inside the root directory of the computer it will run that program everytime the computer starts up.
So if you left it on, then the next time you start up the map, it will turn on automatically.
And if you combine this with a startup file, then it will run that, as Casper mentioned earlier.
But there's no in-built way to turn on computers which weren't on before.
Posted 22 March 2012 - 05:56 PM
If your computers are next to each other, you can use:
c = peripheral.wrap("side")
c.turnOn()
to turn a computer on. You can add it to startup so when you turn on the first one, all of them turn on.Posted 22 March 2012 - 06:34 PM
Yeah, but then you could just as well leave the other computer on to begin with.If your computers are next to each other, you can use:to turn a computer on. You can add it to startup so when you turn on the first one, all of them turn on.c = peripheral.wrap("side") c.turnOn()
Until we can turn computers on remotely, having a computer next to another computer to turn that one on is kind of pointless. :)/>/>
EDIT:
Ok, come to think of it, there kinda already is a workaround to turn on computers remotely.
You could use a turtle to travel to your target computer, let it "dock" on it and then turn it on.
But… I don't know. Realizing that seems to be much more work than what you get out of it, in my opinion. :(/>/>
Edited on 22 March 2012 - 05:40 PM
Posted 22 March 2012 - 07:48 PM
not really, if you specify the exact coords it's just a matter of making it go to designated position. And you can have a base of turtles to turn on computers at your commands… I have to write this :(/>/>
Posted 22 March 2012 - 08:01 PM
3 or 4 times my pcs was turnes off (with previous versions) during server reboot… maybe bug?
I think that "wake on lan" with wireless and cables will be a good idea. Every pc should have a witelist (what pc are allowed to turn on). The "wakeOnLan" command should have a parameter that allow to execute a startup programs (avoiding startup file modifications thing…) like monitor api
I think that "wake on lan" with wireless and cables will be a good idea. Every pc should have a witelist (what pc are allowed to turn on). The "wakeOnLan" command should have a parameter that allow to execute a startup programs (avoiding startup file modifications thing…) like monitor api
Edited on 23 March 2012 - 02:32 AM
Posted 23 March 2012 - 05:42 AM
On my server i use alot of terminals too control things like doors, IC2 production lines and my reactor/generator settup. However due too the fact i restart it every 12 hours every terminal shutsdown. I need a way to restart the terminals on reboot with out me clicking them all. I'm willing to edit the class files but i don't know which one contains the on/off functions.
Posted 23 March 2012 - 05:51 AM
I create a new thread for this, at suggestions. I think that its better to continue over there.
Posted 23 March 2012 - 12:18 PM
Misunderstanding.not really, if you specify the exact coords it's just a matter of making it go to designated position. And you can have a base of turtles to turn on computers at your commands… I have to write this :(/>/>
I didn't mean hard to realize by itself, but it's definitely more work than it's really worth, i.e. just to turn on a computer if I could just as well leave it on.
I mean, it's basically sending out a computer to turn on a computer… yeah, it is possible, but I can't really see any significant use for it.
Posted 23 March 2012 - 01:57 PM
you're right, i could just remove the target computer and have the turtle do its part.
Posted 23 March 2012 - 09:20 PM
So i've tried everything that I can think of and all of my computers on my Bukkit server remember their state correctly and when i either reload or stop and restart the server they always come back up in the same state that they were in when I shut it down.
If your computers are turning off on you during these conditions then bug or SMP Issue??
If your computers are turning off on you during these conditions then bug or SMP Issue??
Posted 24 March 2012 - 09:15 AM
you're right, i could just remove the target computer and have the turtle do its part.
But when the server shuts down, the turtle stops where your normal computer was, and you get the same problem….
Posted 24 March 2012 - 12:31 PM
Do you store the state of the running program in regular intervals to disk?So i've tried everything that I can think of and all of my computers on my Bukkit server remember their state correctly and when i either reload or stop and restart the server they always come back up in the same state that they were in when I shut it down.
If your computers are turning off on you during these conditions then bug or SMP Issue??
Do you have your program as a startup script which will automatically be run when the computer starts up again and then have computer read the last state from file?
Posted 25 March 2012 - 02:15 AM
Do you store the state of the running program in regular intervals to disk?So i've tried everything that I can think of and all of my computers on my Bukkit server remember their state correctly and when i either reload or stop and restart the server they always come back up in the same state that they were in when I shut it down.
If your computers are turning off on you during these conditions then bug or SMP Issue??
Do you have your program as a startup script which will automatically be run when the computer starts up again and then have computer read the last state from file?
Indeed, I do both.
Posted 25 March 2012 - 02:28 AM
Wow, I just realized that you weren't actually referring to a problem, but were telling the OP that you don't have any issues. *Mega-Derp*Indeed, I do both.Do you store the state of the running program in regular intervals to disk? Do you have your program as a startup script which will automatically be run when the computer starts up again and then have computer read the last state from file?So i've tried everything that I can think of and all of my computers on my Bukkit server remember their state correctly and when i either reload or stop and restart the server they always come back up in the same state that they were in when I shut it down. If your computers are turning off on you during these conditions then bug or SMP Issue??
I misread you thinking you tried everything but your turtles and computers don't remember their last state, when in fact you clearly wrote that they do.
Lol, sorry man, I guess from that perspective my last post didn't make any sense at all then, right? :(/>/>