View Full Version : Cron daemon
may i know under which file does DA store all the cron info for users?
DirectAdmin Support
08-03-2003, 11:53 AM
Hello,
/usr/local/directadmin/data/users/username/crontab.conf
is the file that stores the cron information. Modification of this file alone will not add the new cron settings to the cron daemon. It simply stores the data for the user's panel. To actually write the crontab so that the daemon uses it, the crontab.conf file has to be re-written into a temp file (in proper crontab format), and then the following command would be run:/usr/bin/crontab -u username tempfileHope this helps,
John
if a user uses cron daemon to run a background process, will the process be ran under root? or is it under that user's id?
DirectAdmin Support
08-06-2003, 11:02 PM
It would be run under the user's id. Giving everyone root access on the server would be far too much fun :D
John
Saeven
09-12-2006, 12:01 PM
Sorry if this is an obvious question, but I have used sed to edit a large amount of user's crontab.conf:
find ./ -name crontab.conf -exec sed -i 's:/dev/null$:/dev/null >/dev/null 2>\&1:g' {} \; -print
And I was wondering if the command directadmin invokes to parse these into proper cron format, and install them, was available?
Thanks.
Alex
DirectAdmin Support
09-17-2006, 10:46 AM
You can probably just press the "Delete" button from within DA to get DA to rewrite the crontab from the cron.conf. Don't select any crons. If you need it done in mass, then "Delete" via the API (same thing using as script).
There isn't a task.queue rewrite command.
John
Saeven
09-17-2006, 12:21 PM
Thanks for the response - the problem being that we're programmatically adding these cron tasks. Perhaps I could use the DA API to get the job done somehow?
DirectAdmin Support
09-17-2006, 12:56 PM
yes, use this:
http://www.directadmin.com/features.php?id=364
action=delete
without any select0's
John
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.