Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cron install scripts #1332

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
15 changes: 15 additions & 0 deletions jsk_fetch_robot/jsk_fetch_startup/config/install_cron.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

jsk_fetch_startup=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`"/.. > /dev/null && pwd)

IFS=':' read -r -a prefix_paths <<< "$CMAKE_PREFIX_PATH"
current_prefix_path="${prefix_paths[0]}"

set -x

cd $jsk_fetch_startup/cron_scripts
sudo -u fetch crontab cron_fetch.conf
echo "Set cron jobs for fetch user"
sudo -u root crontab cron_root.conf
echo "Set cron jobs for root user"
set +x
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 3 * * * bash -c ". /home/fetch/ros/melodic/devel/setup.bash && rosrun jsk_fetch_startup update_workspace.sh &> /home/fetch/ros/melodic/update_workspace.log"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 4 * * * /sbin/shutdown -r now