Help regarding crontab

Dear All
jobs are scheduled in crontab . To view this I use crontab -l . But suddenly today I am not able to see any jobs that is being scheduled in crontab. when I type crontab -l , I am seeing nothing.I am not logging through admin user(i dont have it).But I can schedule jobs through crontab.

  1. WHY this ?
  2. Is there any way to recover scheduled jobs in crontab ?

Thanks
TKB

tkbharani, most likely, your crontab file has been truncated/removed. You can check that by using 'ls -l /var/spool/cron/crontabs/your_user_name'. This will show whether your file exists and is zero bytes or doesn't exist at all (though I think that it would give you a different message in that case).

Regarding restoration of the file, you will have to talk to the administrators. They should be able to restore this from any OS backup.

hi

my favourite approach to clear my crontab is to type

crontab -e

instead of

crontab -l

and aborting this command with Ctrl-D instead of Ctrl-C
perhaps you did this.
mfg guenter

Hi

With the crontab I would use it by making a file. Make a crontab file in your home dir. Then you can allways restore it when your crontab is missing.

vi crontab.yourname

finished. give this command ...

crontab crontab.yourname

Then is your crontab active from that file..

to remove a crontab ....

crontab -r

Problems can accure when use "crontab -e" sometime changes are not made. when you are in the edite mode. So all ways check after changes.