LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Show currently running cron jobs (https://www.linuxquestions.org/questions/linux-newbie-8/show-currently-running-cron-jobs-751516/)

mr.me 08-31-2009 10:53 AM

Show currently running cron jobs
 
For the life of me i cant find the proper command for showing running cron jobs.

Anybody know who to list currently running crons?

bsdunix 08-31-2009 12:27 PM

Code:

crontab -l [user]
List crontabs for user which are located in /var/spool/cron/crontabs.

I don't know of any command or way to list actual running cron jobs, unless you grep running process for crond and if it's running presume that all user's cron jobs are in fact running, or will run at the specified time unless there's a problem with the job. crond just runs every minute looking for crontabs to execute.

catkin 08-31-2009 12:33 PM

Have you tried looking for a process group with root's /usr/sbin/cron process as the leader? I'm a bit busy right now to test the idea.

djeikyb 08-31-2009 01:00 PM

Run ps -ejH to test catkin's theory

marozsas 08-31-2009 03:40 PM

You may have also system wide (not user's jobs) cron jobs stored at /etc/cron.hourly, cron.daily, cron.weekly, cron.monthly and crond.d.

anomie 08-31-2009 04:39 PM

Well, running cronjobs will be in your process table. So you could keep an eye on them with ps(1), as mentioned.

You could also tail /var/log/cron (depending on distro).

saifkhan123 09-01-2009 12:44 AM

!!!!
 
goto /var/spool and type

Code:

ls *cron*
it will show the cron jobs for daily,monthly,weekly etc

mr.me 09-01-2009 08:18 AM

Thanks for all the reply's, and i will try the suggestions.


All times are GMT -5. The time now is 06:07 PM.