If you plan to do something by linux it's self
you may wanna use 'cron'
but how to do it !
On ubuntu !You can come into the /etc/cron.d/
and create your script ....
and then write some plan ...
and my create_data_table.py script will be run every day 16:00
That's what i wanna ..
</step02> How to run something when the machine start ....
vim /etc/rc.local
But if your programer is blocking ,and you wanna run more than one script ..
You may be need to write a start.py like there I write a multi_process.py
#!/usr/bin/python
import multiprocessing
import os
def run_consumer():
os.execl('/home/txcs/AK/z2.0/consumer.py','i')
def run_producer():
os.execl('/home/txcs/AK/z2.0/producer.py','i')
def run_broker():
os.execl('/home/txcs/AK/z2.0/broker.py','i')
if __name__ == '__main__':
for i in range(5):
c = multiprocessing.Process(target = run_consumer)
c.start()
p_broker = multiprocessing.Process(target = run_broker)
p_broker.start()
p_producer = multiprocessing.Process(target = run_producer)
p_producer.start()
</step03> have fun ...