Two different values in DA cron doing the same thing

Henrik

Verified User
Joined
Mar 14, 2008
Messages
121
Hello,


Inside "/etc/cron.d/directadmin_cron" I see:
Code:
* 4 * * * root echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
20 4 1 * * root echo 'action=reset&value=all' >> /usr/local/directadmin/data/task.queue

When issuing both the of the above, they both seem to launch awstats etc. So, is one of these two crontab lines redundant? As it is now, awstats launches in two instances and this obviously consumes system resources.

EDIT:
Code:
20 4 1 * * root echo 'action=reset&value=all' >> /usr/local/directadmin/data/task.queue
must be for the monthly bandwidth reset, am I correct? So, it would be a matter to run this cron job on a time where the standard cron job is not running... (Pardon, having the xmas food blues getting to my brain here ;))

EDIT 2:
Building awstats through the awstats script inside "/usr/local/directadmin/scripts/awstats.sh" made the system get a very high load. Building awstats through custombuild made it operate under normal conditions, not launch several awstats-tasks at once (which was what caused the high load) etc.

An additional inquiry: Would it be possible to run the task.queue processes as "nice"? If so, what would be the correct syntax to do so inside the crontab?
 
Last edited:
If you've copied in that first code section correctly then both cronjobs are doing the same thing and you shouldn't need the second one. Your supposition that it runs monthly looks reasonable, but I can't see why you'd run the same command 20 minutes later. It doesn't make sense.

It's possible there's an error in the script vs custombuild (or even vice-versal).

Because the echo commands are passing values to the DirectAdmin task.queue, which runs through DirectAdmin, you can't directly nice anything through the task.queue.

Jeff
 
Hello Jeff,


If you've copied in that first code section correctly then both cronjobs are doing the same thing and you shouldn't need the second one. Your supposition that it runs monthly looks reasonable, but I can't see why you'd run the same command 20 minutes later. It doesn't make sense.

It's possible there's an error in the script vs custombuild (or even vice-versal).

The 2nd cronjob seem to reset all bandwidth quotas for all accounts, where-as the first do not, so imho it looks accurate (in hindsight, after posting ;)).


Because the echo commands are passing values to the DirectAdmin task.queue, which runs through DirectAdmin, you can't directly nice anything through the task.queue.

Ah ok, thank you for clarifying. The load issue that came up is gone when installing awstats via custombuild, so that's a relief. Now, load never goes over 1 when running awstats-updates, which is great.

Cheers and a happy new year :)
 
Back
Top