Crontab file

Hi All,
I created a crontab entry in a cron.txt file accidentally entered
crontab cron.txt.

Now my previous crontab -l entries are not showing up, that means i removed the scheduling of the previous jobs by running this command "crontab cron.txt"

How do I revert back to previously schedule jobs.
Please help. this is urgent.,
Thanks.

Restore the crontab for this user from your backup.

I dont know where is the crontab file locatedfor the scheduled jobs.
If I can do it from the backups, can you give me the commands.

There are no special commands for that. Just read old backup crontab and put it in,

crontab -e

and save it.

I dont know where the old backup of crontab is located.
How to find it.

Ask your sys admin to restore it for you.

Try to go to /tmp and do

ls -ltr cron*

Then will appear kind a history of the cron, see the creation dates an look into the one you want. For example I have:

usuario: > cd /tmp/
usuario: /tmp > ls -ltr cro*
-rw-------   1 ecopge   ecuador      859 Jul 25 08:33 crontabJhaiKP
-rw-------   1 ecppga   ecuador        0 Jul 28 16:00 croutFNZCuVqsb

I already modify my crontab file, it is into croutFNZCuVqsb but my last crontab file is into [b]crontabJhaiKP[b].

try it and let me know how are you going.

With backup I meant some external file backup utility or something like that or your system recovery backup for example.
Depends on which OS you are, but a possible location is the directory "/var/spool/cron/crontabs".