Jhorra Jhorra - 1 year ago 92
Linux Question

Run a python application/script on startup using Linux

I've been learning Python for a project required for work. We are starting up a new server that will be running linux, and need a python script to run that will monitor a folder and handle files when they are placed in the folder.

I have the python "app" working, but I'm having a hard time finding how to make this script run when the server is started. I know it's something simple, but my linux knowledge falls short here.

Secondary question: As I understand it I don't need to compile or install this application, basically just call the start script to run it. Is that correct?

Answer Source

You can set up the script to run via cron, configuring time as @reboot

With python scripts, you will not need to compile it. You might need to install it, depending on what assumptions your script makes about its environment.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download