3 from pip
import main
as pipmain
5 from pip._internal
import main
as pipmain
6 pipmain([
'install',
'numpy'])
7 pipmain([
'install',
'python-crontab'])
8 pipmain([
'install',
'opencv-python'])
9 pipmain([
'install',
'pyrealsense2'])
10 pipmain([
'install',
'cron_descriptor'])
14 from crontab
import CronTab
16 system_cron = CronTab(tabfile=
'/etc/crontab', user=
False)
18 system_cron.env[
'SHELL'] =
'/bin/bash' 19 job = system_cron.new(command=
"cd /home/$(ls /home/)/EtherSense; ./AlwaysRunningServer.bash >> /tmp/error.log 2>&1", user=
'root')
26 job = system_cron.new(command=
"sleep %i; cd /home/$(ls /home/)/EtherSense; ./AlwaysRunningServer.bash >> /tmp/error.log 2>&1"%i, user=
'root')
29 job.setall(
'* * * * *')
32 print(
'cron job set to run ' + job.description())
static std::string print(const transformation &tf)