Anonymous_User Absent Member.
Absent Member.
2558 views

How to check whether cron is running scheduled jobs

Hi,

I am new to linux. How do i check to see if cron is running my commands I
entered into the crontab file?

Thanks





Labels (2)
0 Likes
3 Replies
Anonymous_User Absent Member.
Absent Member.

Re: How to check whether cron is running scheduled jobs

JP wrote:
> Hi,
>
> I am new to linux. How do i check to see if cron is running my commands I
> entered into the crontab file?


They should show up in the /var/log/cron file, which you can read with
your favorite text editor or pager.

--
Justin Grote
Novell Support Connection Sysop
Network Architect
JWG Networks
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: How to check whether cron is running scheduled jobs

I dont have a file called cron located under /var/log.

Is that file only created after a job has successfully started?

The problem I am experiencing is my cron job is not starting.

Since I posted this, I donwload webmin and highlighted my job, selected Run
Now and it executed fine. It jsut doesnt start when it has actually been
scheduled.

Thanks

"Justin Grote [SysOp]" <jgrote@jwgnetworks.com> wrote in message
news:gAXgg.3799$8_3.2488@prv-forum2.provo.novell.com...
> JP wrote:
>> Hi,
>>
>> I am new to linux. How do i check to see if cron is running my commands
>> I entered into the crontab file?

>
> They should show up in the /var/log/cron file, which you can read with
> your favorite text editor or pager.
>
> --
> Justin Grote
> Novell Support Connection Sysop
> Network Architect
> JWG Networks



0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: How to check whether cron is running scheduled jobs

JP wrote:
> I dont have a file called cron located under /var/log.


Err, sorry, I was thinking SLES9. You are correct, these messages
actually just go into /var/log/messages. You can extract them with the
following command:

grep -i cron /var/log/messages | less

If you'd rather save them to a file to view with your favorite text
editor, do this:

grep -i cron /var/log/messages > ~/cronmessages.log

which will create a file called cronmessages.log in your home directory.

/etc/crontab is the file that defines your system-wide cron jobs. OES
also takes this a step further and creates cron.daily, cron.weekly, etc.
folders that make it easy to just drop a script in and run it at that
interval.

To see your user-specific cron jobs, use crontab -e (or KCron or
whatever your graphical tool of choice is)


--
Justin Grote
Novell Support Connection Sysop
Network Architect
JWG Networks
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.