Jump to content

crees

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

crees's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks again for the help.  executing the script with in the backgound caused it to run untill an echo or exec statement was issued in the php code.  I found another method yesterday and use the open -l PHP alcd.php command.  I had to yum the open program to get it on my centos box.  now the program with the -l loads the program to be executed in another ttl terminal with the same permisstions as the logged in user (im my case root)  Now it runs great and is out of the way of tying up the console.  Thanks again for your time.
  2. [quote author=thorpe link=topic=121113.msg498679#msg498679 date=1168140729] That is not at all what cron is for. Cron is for running a job at a certain time. You'll want to look at the CentOS docs for init scripts, most distros handle these a little differently from each other. [/quote] Tanks for the clarification.  I will check the init scripting in Centos to see if I can get a clearer understanding.  Perhaps it will be easier to do as neylitalo stated and have it launched at startup.  Only problem that is I would like it to run withoug tying up roots console login. (ie when I lauch the script its runs great but I cannot run anything else on the colole untill I kill it).  Whats the best method of running it in the background with root access? Or is this getting back to biulding it as a service and running it in the init stuff? Thanks again crees
  3. thanks for the reply I am using centos I prefer to run the php CLI file as a service if I can. I have also looked at putting it as a cron job.  If I do run it in the cron system how would i tell it to execute once on start-up? I think it would be easier this method but wouldn't mind learning both ways a little more background,   I have succesfully got a php based script to manage the Crystalfontz 635 USB LCD and send program stats, uptime etc.  I am currently designing menu systems, but before I get to carried away I want to make sure I can get the base PHP script to run after bootup and listen for keypresses and other info via xml, mysql etc.  I chose PHP because its easier for me to understand (althoe im not the best with it)  and it seams that php provides the CLI to allow stuff like this to run. Thanks again.
  4. Hi all I have a PHP script that runs at the root command line on linux (uses ttyUSB0) and basically monitors the port to send and receive data(does not get executed via web).  I would like to have this script startup during the boot process and then also be cleanly shutdown on restart or shutdown. Do any of you have a suggestions on how to do this?  Right now I simply execute the script by the PHP alcd.php at the command line in the directory of the alcd.php file.  when I want the script to stop I hit control C since it runs a while (true) statement. However the code is written to time out every 5 seconds and check to make sure there are no other commands to proccess so I could have it check an xml, mysql, text data entry to see if it should stop, restart etc. Thanks in advance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.