- 论坛徽章:
- 0
|
在/etc/crontab里面是这样写的:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * command to be executed
*/2 * * * * /etc/rc.d/init.d/c3_test
这个脚本很简单,应该不涉及到什么环境变量的问题吧:
#!/bin/bash
echo "hi world" >> /test.txt |
|