The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



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.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Where is the crontab file stored rajbptl UNIX for Advanced & Expert Users 3 01-18-2008 09:46 AM
Reformat Crontab file alnita Shell Programming and Scripting 1 04-11-2007 03:28 AM
need help to write crontab file deepa20 Shell Programming and Scripting 4 02-06-2006 08: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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-28-2008
mradsus mradsus is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 6
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.
  #2 (permalink)  
Old 07-28-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,285
Restore the crontab for this user from your backup.
  #3 (permalink)  
Old 07-28-2008
mradsus mradsus is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 6
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 (permalink)  
Old 07-28-2008
ynilesh's Avatar
ynilesh ynilesh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore, India.
Posts: 222
There are no special commands for that. Just read old backup crontab and put it in,
Code:
crontab -e
and save it.
  #5 (permalink)  
Old 07-28-2008
mradsus mradsus is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 6
I dont know where the old backup of crontab is located.
How to find it.
  #6 (permalink)  
Old 07-28-2008
jhtrice's Avatar
jhtrice jhtrice is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 69
Ask your sys admin to restore it for you.
  #7 (permalink)  
Old 07-28-2008
lestat_ecuador lestat_ecuador is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 28
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0