LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-31-2011, 04:31 PM   #1
kais1
Member
 
Registered: Dec 2008
Posts: 61

Rep: Reputation: 17
crontab mystery


Dear all,

We have the MEDU002.sh script scheduled in the cron . but, there is no entry for the script MEDU002_em.sh . Am 100% sure as I checked it so many times.

meddb02:med:/float/appl/med/bin$ crontab -l | grep MEDU002*
MEDU002.sh:echo "------------------------------------------------------------" 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002.sh:echo "------------------------------------------------------------" 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002.sh:echo "SETTLEMENT Started on `date` " 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002.sh:$BIN/MEDU002 0000000000 9999999999 N N 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002.sh:echo "SETTLEMENT Finished on `date` " 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002.sh:echo "------------------------------------------------------------" 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002.sh:echo " " 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002_em.sh:echo "------------------------------------------------------------" 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002_em.sh:echo "------------------------------------------------------------" 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002_em.sh:echo "SETTLEMENT Started on `date` " 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002_em.sh:$BIN/MEDU002 0000000000 9999999999 C N 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002_em.sh:echo "SETTLEMENT Finished on `date` " 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002_em.sh:echo "------------------------------------------------------------" 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log
MEDU002_em.sh:echo " " 1>>$LOG/MEDU002.log 2>>$LOG/MEDU002.log


but,so many times, the script MEDU002_em.sh is running automatically . but , we have no idea from where this script is executing as the crontab doesn't have any entry for this script ? . The file MEDU002_em.sh physically exist in the server

Any idea ?

Kai
 
Old 07-31-2011, 05:37 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,842

Rep: Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756
Each user has their own crontab. Check which user is running MEDU002_em.sh using ps. Anything run by the system from /etc/cron.d/ or /etc/crontab will be run by root.

If it is running from the same user where you are checking the crontab, then maybe it is being run by a script which does not have MEDU002 in the name, so it does not show up on your grep. You can tell what process started it (ppid) from ps also.
 
1 members found this post helpful.
Old 07-31-2011, 07:21 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,412

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Your qn makes no sense to me; the last 5 lines of that crontab all begin with "MEDU002_em.sh" ...
 
Old 07-31-2011, 08:10 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Plus none of those lines comprise a valid crontab entry ...

They're the result of your *
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux crontab vs unix crontab ytd Linux - General 2 08-09-2009 06:07 AM
replaced crontab, now should get crontab back to what it was raminn Linux - Newbie 2 10-20-2008 08:15 PM
man crontab(5) vs crontab(1) Canis Polaris Linux - Newbie 2 06-04-2008 05:03 PM
mystery jhon Linux - Networking 1 09-01-2004 10:38 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 01:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration