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