Unix/Linux Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Crontab file

UNIX for Advanced & Expert Users


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 07-28-2008   -   Original Discussion by mradsus
mradsus's Unix or Linux Image
mradsus mradsus is offline
Registered User
 
Join Date: Jul 2008
Last Activity: 5 August 2008, 4:30 AM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Sponsored Links
    #2  
Old Unix and Linux 07-28-2008   -   Original Discussion by mradsus
zaxxon's Unix or Linux Image
zaxxon zaxxon is offline Forum Staff  
code tag tagger
 
Join Date: Sep 2007
Last Activity: 21 February 2018, 7:14 AM EST
Location: St. Gallen, Switzerland
Posts: 6,574
Thanks: 178
Thanked 568 Times in 482 Posts
Restore the crontab for this user from your backup.
Sponsored Links
    #3  
Old Unix and Linux 07-28-2008   -   Original Discussion by mradsus
mradsus's Unix or Linux Image
mradsus mradsus is offline
Registered User
 
Join Date: Jul 2008
Last Activity: 5 August 2008, 4:30 AM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
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.
    #4  
Old Unix and Linux 07-28-2008   -   Original Discussion by mradsus
ynilesh's Unix or Linux Image
ynilesh ynilesh is offline
Registered User
 
Join Date: Oct 2007
Last Activity: 7 April 2009, 7:39 AM EDT
Location: Bangalore, India.
Posts: 222
Thanks: 0
Thanked 0 Times in 0 Posts
There are no special commands for that. Just read old backup crontab and put it in,


Code:
crontab -e

and save it.
Sponsored Links
    #5  
Old Unix and Linux 07-28-2008   -   Original Discussion by mradsus
mradsus's Unix or Linux Image
mradsus mradsus is offline
Registered User
 
Join Date: Jul 2008
Last Activity: 5 August 2008, 4:30 AM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
I dont know where the old backup of crontab is located.
How to find it.
Sponsored Links
    #6  
Old Unix and Linux 07-28-2008   -   Original Discussion by mradsus
jhtrice's Unix or Linux Image
jhtrice jhtrice is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 10 September 2010, 7:09 AM EDT
Posts: 75
Thanks: 0
Thanked 1 Time in 1 Post
Ask your sys admin to restore it for you.
Sponsored Links
    #7  
Old Unix and Linux 07-28-2008   -   Original Discussion by mradsus
lestat_ecuador's Unix or Linux Image
lestat_ecuador lestat_ecuador is offline
Registered User
 
Join Date: Oct 2006
Last Activity: 26 August 2009, 6:43 PM EDT
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Try to go to /tmp and do



Code:
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:



Code:
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.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem with crontab file bobble14988 UNIX for Dummies Questions & Answers 2 08-10-2011 10:21 AM
Question about crontab file! shipon_97 Red Hat 2 10-14-2009 04:23 PM
How to edit the crontab file rajus19 Shell Programming and Scripting 2 05-25-2007 09:34 AM
crontab file mclaughline Filesystems, Disks and Memory 1 08-17-2005 11:21 PM
/bin/sh: /usr/bin/vi: No such file or directory when doing crontab kwalter UNIX for Dummies Questions & Answers 3 05-15-2001 12:13 PM



All times are GMT -4. The time now is 10:47 PM.