0

I started a crontab job in a server remotely (in a screen session) from a local machine. Days later, I terminated the screen session and restarted my local machine. The cron job in the server is still running (I'm sure about this). But using crontab -l will show

"no crontab for xxx"

Nor does crontab -r deletes the job. So is it kind of zombie now? How do I manage it?

Andrew B
  • 31,858
  • 12
  • 90
  • 128

1 Answers1

4

Look in the log that contains your cron messages (/var/log/{cron,syslog} or elsewhere) and see which user is running the jobs and ensure that it's the user you expect.

May 21 07:34:01 centos6 CROND[23644]: (iain) CMD (/path/to/somecommand) 

Failing that it's possible you added them to /etc/crontab or one of the fragments in /etc/cron.d or even put a script in /etc/cron.{daily,hourly,monthly,weekly}.

If it's in a user crontab you can use

crontab -e -u user

to edit the relevant user's file or directly edit /etc/crontab.

If you can't find which user you could also go looking in /var/spool/cron/crontabs.

user9517
  • 114,104
  • 20
  • 206
  • 289