0

I have a crontab in the same name crontab. Need to check whether its running currently or not.

Its placed in /etc/crontab in a Linux machine.

I guess its service name is crond. So I tried grep crond.

If its wrong please confirm me?

How can I check it?

Gnik
  • 7,120
  • 20
  • 79
  • 129
  • Depends on your distribution, but `crond` is not a bad guess. But finally you will have to either read the documentation or check the file contents of the cron package installed. Also a look at the daemons startup script should be helpful. – arkascha Mar 13 '14 at 06:10
  • Actually I just see in my system that it is just `/usr/sbin/cron`. Grepping for "cron" is better anyway when you don't know the exact name: `ps aux|grep cron` – arkascha Mar 13 '14 at 06:11
  • I think this might be a version specific question. In my case, I have `/usr/bin/crontab` which is the `crontab` executable, `/usr/sbin/cron` which is the `cron` executable and `/etc/init.d/cron` which is the service since `ps aux | grep cron` returns a process named `cron`. What OS/version are you using? – Anshul Goyal Mar 13 '14 at 06:14

1 Answers1

0

Try to run:

/usr/sbin/service cron status

You could get something like that:

user@server:~$ /usr/sbin/service cron status
[ ok ] cron is running.
Moonray
  • 41
  • 4