I cannot see my crontab file in /usr/spool/cron/crontabs but I think it is still there if that makes sense because I am getting results from it. How do I make it appear again???
normally crontabs are in /var/spool/cron/crontab(s) -----------
Ohne Intelligenz bist Du ein Fiasko,
ohne Technik ein Amateur und
ohne Herz eine Maschine.
Since there is always a root crontab (unless you removed it) why don't you do a find on root. It will show up in the storage place for other crontabs.
Storage location varies by version. Ed Fair
unixstuff@juno.com
Any advice I give is my best judgement based on my interpretation of the facts you supply. Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.
Yes the afore mentioned directory is where the root crontab file is. When I logged in as myself (i.e. not root) and do crontab -l in this directory I get:
crontab: can't open your crontab file
I added the lines I need into root because I needed to have my reports working. However, now I am getting 2 of every report which would appear to me to be because there are two crontab files running the same report.
I ran crontab -l as root from / and got a listing of the lines in the root crontab file.
I ran crontab -l as myuser from / and got crontab: can't open your crontab file
What I had done before was created a file with a list of jobs in it and then used:
crontab <filename> and it worked.
but when I do that now I get: crontab: can't open your crontab file
I am accessing a Sun 0S 5.8 Server from a Red Hat Linux 9 release 2.4.18-3 machine.
If you as a user run crontab -l and get a message like the following, that is because you don't have any crontab jobs (or file) in the aforementioned path. This is to be expected for the vast majority of user accounts.
user@esso0es0070:/ $ crontab -l
0481-103 Cannot open a file in the /var/spool/cron/crontabs directory.
A file or directory in the path name does not exist.
cron doesn't normally check the crontab files. Usually it only reads them when cron is initialised or it receives an interrupt.
It sounds like your user did have a crontab file created but this has since been deleted, however there is still an image of that file that cron has in memory.
I would suggest stopping and starting the cron daemon to clean out any crap in memory and then manually recreating your users cron file. (check your backups to see if it was saved at any point otherwise you are going to have to type it all in).
use the 'crontab <filename>' method as your user and check that your users crontab file is created OK and then remove the extra entries you added to the root crontab.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.