(SuSE 9.1, Gnome 2.4, kernal 2.6.5-7.108-default) I used kcron to set up a nightly backup but it doesn't work. I've run the crontab entry manually and the command works ok. The SuSE manual says that crontab is now located in /var/cron but that directory doesn't exist. Kcron, as it turns out, is saving the crontab in the /etc directory. An obvious solution is to create /var/cron and then move crontab from the /etc directory to /var/cron. My CLI skills are pretty weak so I would like someone to confirm that the "obvious solution" is the correct thing to do. Any assistance here will be appreciated. -- Donald D. Henson, Managing Director West El Paso Information Network The "Non-Initiation of Force Principle" Rules
Hi Donald,
crontab from the /etc directory to /var/cron. My CLI skills are pretty weak so I would like someone to confirm that the "obvious solution" is
Crontab should not be too demanding so maybe you should give it a try from the CLI since that would eliminate (in principle) any doubts about the correct path. If you know the lines you need to put in your crontab file you can just add them by crontab -u your_username the-line_you_need_to_add You can list all your cron jobs by crontab -l . man crontab gives pretty usefull information. Brana
Hi
On 08/10/04 02:29 PM, Donald D Henson
(SuSE 9.1, Gnome 2.4, kernal 2.6.5-7.108-default)
I used kcron to set up a nightly backup but it doesn't work. I've run the crontab entry manually and the command works ok. The SuSE manual says that crontab is now located in /var/cron but that directory doesn't exist. Kcron, as it turns out, is saving the crontab in the /etc directory. An obvious solution is to create /var/cron and then move crontab from the /etc directory to /var/cron. My CLI skills are pretty weak so I would like someone to confirm that the "obvious solution" is the correct thing to do. Any assistance here will be appreciated.
The crontabs are actually stored in /var/spool/cron/tabs/$USERNAME copying the kcron tab into the relevant user file, presumably root should do the trick. Alternatively use crontab -e run as the relevant user and write it there. Regards, Ben
On Friday 08 October 2004 9:29 am, Donald D Henson wrote:
(SuSE 9.1, Gnome 2.4, kernal 2.6.5-7.108-default)
I used kcron to set up a nightly backup but it doesn't work. I've run the crontab entry manually and the command works ok. The SuSE manual says that crontab is now located in /var/cron but that directory doesn't exist. Kcron, as it turns out, is saving the crontab in the /etc directory. An obvious solution is to create /var/cron and then move crontab from the /etc directory to /var/cron. My CLI skills are pretty weak so I would like someone to confirm that the "obvious solution" is the correct thing to do. Any assistance here will be appreciated.
You might want to execute the crontab command directly. You didn't say whether you were doing a systemwide backup or a individual-user backup. Crontab works in either case, but the files it uses might be different. You shouldn't need to manipulate any system files if you're using the crontab command as an individual user. What I do is to build a personal crontab table, ~/mycrontab, and install it using the command crontab ~/mycrontab I then check the installation with crontab -l Paul Abrahams
On Fri, 2004-10-08 at 11:27, Paul W. Abrahams wrote:
On Friday 08 October 2004 9:29 am, Donald D Henson wrote: You might want to execute the crontab command directly. You didn't say whether you were doing a systemwide backup or a individual-user backup. Crontab works in either case, but the files it uses might be different. You shouldn't need to manipulate any system files if you're using the crontab command as an individual user.
What I do is to build a personal crontab table, ~/mycrontab, and install it using the command crontab ~/mycrontab I then check the installation with crontab -l
Paul Abrahams
Another thing to remember when using cron is that there is little to no environment (path etc.) setup for the running user, you need to set that up in your script. It is always best to use the full path to any program/script that you use. -- Ken Schneider UNIX since 1989 SuSE since 1998 * Only reply to the list please*
On Friday 08 October 2004 11:35 am, Ken Schneider wrote:
Another thing to remember when using cron is that there is little to no environment (path etc.) setup for the running user, you need to set that up in your script. It is always best to use the full path to any program/script that you use.
Good point, Ken. I got skewered on that one. I've gotten into the habit of checking out my crontab entries by creating one with "* * * * *" so that it runs my application every minute. That way I can see right away if it's working or not. Once I've gotten it working, of course, I replace the asterisks by the correct time setting. Paul
participants (5)
-
Ben Higginbottom
-
Branimir Vasilic
-
Donald D Henson
-
Ken Schneider
-
Paul W. Abrahams