Cron Keyboard Commands

General support questions including new installations
boboman13
Posts: 1
Joined: 2013/06/26 03:02:35
Contact:

Cron Keyboard Commands

Postby boboman13 » 2013/06/26 03:22:35

Hello, I have been setting up a CentOS server for a Minecraft server of mine (it is ok if you don't know what that is), of which, I truthfully have 0 experience in CentOS. I have learned lots of commands and followed lots of tutorials.

What I want: I would like, on the specified command, to create a screen, do some things, then exit the screen back to the root directory.

This is what I have so far: @reboot cd /*insert file path here* && screen -S MAIN && ./start.sh && ...

I don't know how to close the screen, because usually you do CTRL + A + D, but you need to put it into a command, don't you? BTW, after you use ./start.sh you cannot really use any regular commands as the command line is from then on taken up by the Bukkit command line.

How would I be able to exit the screen and get back to the root folder after I do this?

DaemonProgrammr
Posts: 78
Joined: 2011/12/12 12:49:46

Cron Keyboard Commands

Postby DaemonProgrammr » 2013/06/27 08:26:03

Ok...

Not entirely up to date with the Bikkit command line (thankfully a lot more with MC.. ;-) ) But to clarify:
You're using a cronjob, to create a GUI window, to run a commandline interface utility?

In that case, you might be overcomplicating this....

The thing about cron is, it's supposed to be used for background processes(!) that will have no interface.
These can be timed in the crontab to run at specific points in time.

To automate the bukkit commands, write a script that calls the bukkit commandline and add the input as parameters.
If this doesn't work because the commandline utility doesn't expose the functionality through parameters, pipe a
stream of instructions into the command when you call it.



Edit:
Incidentally, if you áre running CentOS 4, you might want to consider updating... ;-) CentOS 4 has gone the
way of the dinosuars a while ago and the most up to date (secure(!)) one is CentOS6.x...