View previous topic :: View next topic |
Author |
Message |
trumee Guru
Joined: 02 Mar 2003 Posts: 551 Location: London,UK
|
Posted: Tue Oct 07, 2003 6:11 pm Post subject: crontab and user |
|
|
Hi,
I want a cron job to run as a normal user and execute every 5 minutes. Instead of messing with the crontab file, i tried webmin to setup the cronjob. A file with my user name was created in /var/spool//cron/crontabs/trumee, which works fine if i do a 'run cron' manually from the webmin page.
However if i leave the system as it is, the cron job is not executed. I feel that the crontab files in /var/spool/cron/crontabs/ is not getting recognised by the system and only /etc/crontab jobs are getting executed. So is there any way i can change the crontab file to /var/spool/cron/crontabs/ . Or alternatively can i specify the command in /etc/crontab to be run as SPECIFIC user?
Thanks |
|
Back to top |
|
|
neilhwatson l33t
Joined: 06 Feb 2003 Posts: 719 Location: Canada
|
Posted: Tue Oct 07, 2003 6:15 pm Post subject: |
|
|
Is your cron daemon running?
Is your user account a member of the cron group? _________________ The true guru is a teacher.
Neil Watson |
|
Back to top |
|
|
trumee Guru
Joined: 02 Mar 2003 Posts: 551 Location: London,UK
|
Posted: Tue Oct 07, 2003 6:23 pm Post subject: |
|
|
cron daemon seems to be running
---------------------------------------------------------------
ps -ef |grep cron
root 1139 1 0 10:26 ? 00:00:00 /usr/sbin/crond
root 24531 24528 0 19:22 pts/3 00:00:00 grep cron
-----------------------------------------------------------------
However the user is not a member of cron group, is that necessary? |
|
Back to top |
|
|
neilhwatson l33t
Joined: 06 Feb 2003 Posts: 719 Location: Canada
|
Posted: Tue Oct 07, 2003 6:26 pm Post subject: |
|
|
I believe so. This a security measure that prevents users from running cronjobs without authorization. _________________ The true guru is a teacher.
Neil Watson |
|
Back to top |
|
|
|