12 lines
411 B
Bash
Executable File
12 lines
411 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Adding cron entries..."
|
|
# write out current crontab
|
|
crontab -l > temp_crontab
|
|
# echo new cron into cron file
|
|
printf "*/5 * * * * source $PWD/../virtualenv.sikweb/bin/activate && python $PWD/manage.py hsl &>$PWD/logs/fetch_hsl.log\n\n" >> temp_crontab
|
|
# install new cron file
|
|
crontab temp_crontab
|
|
rm temp_crontab
|
|
echo "Done. View your crontab with 'crontab -l' and edit it with 'crontab -e'."
|