跳过导航.
首页

cron

directadmin里不能自动刷新用户统计信息的解决办法

在安装directadmin之后经常会遇到类似的问题,用户的流量统计,空间占用信息都不会显示出来。
一般这种情况只是因为cron没有运行而已。
directadmin在官方也有解决办法。
http://help.directadmin.com/item.php?id=107

1) check for /usr/local/directadmin/data/task.queue
It should be deleted every minute. If it exists, check it's contents. If there are more than just 1 or 2 lines, then the dataskq is not running.

2) check /var/log/cron (/var/log/syslog on Debian). See if the dataskq is running every minute (logged every minute). If not, try running

chmod 644 /etc/cron.d/directadmin_cron

ubuntu下使用crontab

crontab 的基本用法

列出当前用户签定的任务: # crontab -l


删除当前用户签定的任务: # crontab -r



签定新的任务:


方式1,用配置文件/etc/crontab,其中在命令前要填写用户名,要使这种方式即刻生效必须重启系统:


nano /etc/crontab


# m h dom mon dow user  command


30 23 * * * root echo "hello"


解释:


m - month


h - hour


dom - day of the month


mon - month


dow - day of the week

centos下的cron配置文件设置

在/var/spool/cron/目录中,文件以用户名命名。在Slackware中是位于/var/spool/cron/crontabs/目录中。

 

同步内容