I have browsed the mailing list on any cron issues, but could not find an answer to the problem I am currently experiencing.
So here goes. I just got my own server that had Linux pre-installed on there. My cron problem are 1. jobs that I created as root in /var/spool/cron is not getting executed. 2. How do I give crontab access to other users on the server ? Issue 1: Cron not working =========================== Below is detailed instructions on what I did, and why I think this is the problem. I cannot resolve it due to my lack of knowledge on cron, linux etc ... 1. I first checked to see if cron is actually running. The output is pasted below. ---------------------------------------------------- [root@ensim admin]# ps -aef | grep cron root 1200 1 0 Jan05 ? 00:00:00 crond root 17364 8290 0 04:02 ? 00:00:00 /usr/local/sbin/cronolog /home/v root 17365 8290 0 04:02 ? 00:00:00 /usr/local/sbin/cronolog /home/v root 17366 8290 0 04:02 ? 00:00:00 /usr/local/sbin/cronolog /home/v root 18530 18528 0 07:01 ? 00:00:00 awk -v progname=/etc/cron.hourly [root@ensim admin]# ----------------------------------------------------- 2. As a test, as root I created a simple cron job as per below 2.1. crontab -e 2.2. 0,5,10,15,20,25,30,35,40,45,50,55 * * * * touch /tmp/i-was-here 2.3. Saved the file (It said cron started) I went to /var/spool/cron, and I can see that the cron job was created. Output below ------------------------------------------------------------------ [root@ensim cron.daily]# cd /var/spool/cron [root@ensim cron]# ls -al total 16 drwx------ 2 root root 4096 Jan 15 08:39 . drwxr-xr-x 11 root root 4096 Jun 2 2000 .. -rw------- 1 root root 276 Jan 15 08:39 root [root@ensim cron]# ------------------------------------------------------------------ As a double check, I tried "crontab -l", with this output ---------------- [root@ensim cron]# crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.15106 installed on Tue Jan 15 08:39:25 2002) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 0,5,10,15,20,25,30,35,40,45,50,55 * * * * touch /tmp/i-was-here [root@ensim cron]# ---------------- But my problem is that when I check the /tmp directory every 5 minutes I see no file called "i-was-here" . I checked the cron and messages logs in /var/log, and I see nothing that shows that the job is even getting executed. I have gone through Red hat manual about automated tasks, but they do not say much how to debug these kind of issues. Do I have to enter anything in the directories cron.d, cron.daily, etc ... ? If so what do I enter there ? Issue 2: Giving others access to cron ======================================= At present on this server, only root and user admin can run crontab. What do I have to do to give other user account that I create access to crontab when they connect via SSH ? Does it matter if the account on Apache is virtual host or IP based site ? Thanks in advance Louis. -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
