Hi,
I am setting up a bunch of jobs in cron that run scripts to check for any issues with my Vertica DB. I have one script that is supposed to run every 15 minutes, but I don't think it is
How can I check if a cron job ran?
How to check if a cron job ran?
Moderator: NorbertKrupa
How to check if a cron job ran?
Thank you!
Joshua
Joshua
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: How to check if a cron job ran?
If you are using Redhat, CentOS or Fedora you can check the /var/log/cron file.
Example:
Example:
Code: Select all
[root@vertica001 ~]# tail -10 /var/log/cron
Oct 31 08:10:01 vertica01 CROND[5688]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Oct 31 08:15:02 vertica01 CROND[6451]: (dbadmin) CMD (~/scripts/db_status/db_status.sh &> ~/scripts/db_status/db_status.log)
Oct 31 08:15:02 vertica01 CROND[6452]: (dbadmin) CMD (~/scripts/node_status/node_status.sh &> ~/scripts/node_status/node_status.log)
Oct 31 08:20:01 vertica01 CROND[7164]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Oct 31 08:30:02 vertica01 CROND[8528]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Oct 31 08:30:02 vertica01 CROND[8529]: (dbadmin) CMD (~/scripts/node_status/node_status.sh &> ~/scripts/node_status/node_status.log)
Oct 31 08:30:02 vertica01 CROND[8531]: (dbadmin) CMD (~/scripts/db_status/db_status.sh &> ~/scripts/db_status/db_status.log)
Oct 31 08:40:01 vertica01 CROND[9860]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Oct 31 08:45:01 vertica01 CROND[10549]: (dbadmin) CMD (~/scripts/node_status/node_status.sh &> ~/scripts/node_status/node_status.log)
Oct 31 08:45:01 vertica01 CROND[10550]: (dbadmin) CMD (~/scripts/db_status/db_status.sh &> ~/scripts/db_status/db_status.log)
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.