commit | author | age | ||
90c639 | 1 | #!/bin/bash |
Z | 2 | |
3 | basepath=$(cd `dirname $0`; pwd) | |
4 | result=$(crontab -l|grep -i "* * * * * $basepath/queue.sh"|grep -v grep) | |
5 | if [ ! -n "$result" ] | |
6 | then | |
7 | crontab -l > createcrontemp && echo "* * * * * $basepath/queue.sh" >> createcrontemp && crontab createcrontemp && rm -f createcrontemp | |
8 | echo -e "\033[32mOk.\033[0m" | |
9 | else | |
10 | echo "The process has been add ." | |
11 | fi |