[英]kali linux terminal crontab file
I do one crontab
file 我做一个crontab
文件
with this code 用这个代码
sum=0
i="y"
echo " Enter one no."
read n1
echo "Enter second no."
read n2
while [ $i = "y" ]
do
echo "1.Addition"
echo "2.Subtraction"
echo "3.Multiplication"
echo "4.Division"
echo "Enter your choice"
read ch
case $ch in
1)sum=`expr $n1 + $n2`
echo "Sum ="$sum;;
2)sum=`expr $n1 - $n2`
echo "Sub = "$sum;;
3)sum=`expr $n1 \* $n2`
echo "Mul = "$sum;;
4)sum=`expr $n1 / $n2`
echo "Div = "$sum;;
*)echo "Invalid choice";;
esac
echo "Do u want to continue ?"
read i
if [ $i != "y" ]
then
exit
fi
done
How can I make the program to do every 10 minutes ... where can I put this command ? 我如何使程序每10分钟执行一次...我可以在哪里放置此命令? 10 * * * *
Then, I make another one vi file with the same code can I make this file to crontab 然后,我用相同的代码制作另一个vi文件,可以将此文件制作为crontab
With Linux, you probably are using vixie-cron (see manual page ). 在Linux上,您可能正在使用vixie-cron(请参见手册页 )。 That provides an extension which simplifies step expressions. 这提供了一个简化步骤表达式的扩展。 For example 例如
*/10 * * * * path-to-my-script
would run 会跑
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.