Run Python script at startup using upstart

114

Solution 1

Upstart scripts go in /etc/init not /etc/init.d, It was a long week that week. :(

Solution 2

Share:
114

Related videos on Youtube

Anthony DeFallo
Author by

Anthony DeFallo

Updated on September 18, 2022

Comments

  • Anthony DeFallo
    Anthony DeFallo over 1 year

    I am working on a program where I will text a message to my Twilio number and have it send the message out to a group of people. I want the numbers to read from either a SQL database (so that people can sign up on a website via PHP) or through a Google Sheets spreadsheet. I really don't know where to start and was wondering if I could get some input from the pros.

    Thank you!

    Anthony

    • Zoredache
      Zoredache over 11 years
      Your test script is not fork()ing so your expect line is probably wrong. Are you really sure you want to respawn?
    • never_odd_or_even
      never_odd_or_even over 11 years
      This is just a test script I will want the script I plan to run in production to respawn. I'll take out the fork() and see how I go.
  • never_odd_or_even
    never_odd_or_even over 11 years
    sudo /etc/init.d/script.conf gives the following output line 3: description: command not found line 4: author: command not found start: Unknown job: on stop: Unknown job: on line 18: respawn: command not found Script started, file is typescript
  • never_odd_or_even
    never_odd_or_even over 11 years
    Upstart scripts go in /etc/init not /etc/init.d :(
  • Anthony DeFallo
    Anthony DeFallo almost 7 years
    So you would use the sheet to update the contact numbers and all, correct? And then in order to run both, will each one be in PHP? Sorry for all of the questions, I am very new to PHP coding.
  • Marcos Placona
    Marcos Placona almost 7 years
    You could have them both in the same program yeah.