0

have removed jobs from crontab but somehow it's still running at the scheduled time. I am really not sure what to do.

Below I have also removed user crontab with:

sudo crontab -r -u USERNAME
$sudo ls -l /var/spool/cron/
total 4
-rw-------. 1 root root 121 Jan  7 02:28 root

This is user's crontab which is empty:

$crontab -l
$

This is cron log from /var/log (It's not even showing here)

Mar 18 21:01:01 u0101 run-parts(/etc/cron.hourly)[65988]: starting 0anacron
Mar 18 21:01:01 u0101 run-parts(/etc/cron.hourly)[65997]: finished 0anacron
Mar 18 21:10:01 u0101 CROND[66668]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 18 21:20:01 u0101 CROND[67392]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 18 21:30:02 u0101 CROND[68097]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 18 21:30:02 u0101 CROND[68098]: (root) CMD (/root/linux-mem.sh 1>/dev/null 2>&1)
Mar 18 21:40:01 u0101 CROND[68851]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 18 21:50:01 u0101 CROND[69614]: (root) CMD (/usr/lib64/sa/sa1 1 1)

What else to lookout for? should I change my script names? I really cant figure out how to stop the jobs from running?

12
  • Why don't you show us that job? Commented Mar 19, 2021 at 5:25
  • 05 00 * * 1-7 /home/kile/insertPRD.sh >> /home/kile/Cronlog/Insert.log 2>&1 This was one of the jobs in user crontab, it's been removed & crontab is completely empty...even cronlog is not showing the above script was triggered however, the script is still running.
    – Amin
    Commented Mar 19, 2021 at 5:55
  • As a matter of now that i give : $ crontab -l no crontab for USER $ And yet still job is running at scheduled time. Its weird. There are no other users scheduling this cron job except me
    – Amin
    Commented Mar 19, 2021 at 5:58
  • Add ps -ef to the insertPRD.sh script to see what might have launched it. Commented Mar 19, 2021 at 6:38
  • 2
    How do you know the script is running?
    – Kusalananda
    Commented Mar 19, 2021 at 10:04

2 Answers 2

0

If you are sure cron isn't running it - have a look if there's a process hanging around, or perhaps some other user has it in cron (needs to be done as root).

1
  • What artefact convinces you it's running?
    – Mr R
    Commented Mar 19, 2021 at 4:31
0

Finally FIGURED OUT!!!!!! Our internal team had cloned our server to UAT environment which created a copy of all jobs/crontab etc. Thanks for all the help.

1
  • Amin, thank you!!! You helped me realize the same thing was happening to me!
    – DaveK
    Commented May 7, 2022 at 9:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .