Crontab: Set to run every hour but runs every 15 minutes. Why?

I have the following set in /etc/crontab

40 * * * * root wget -q -O - '' >/dev/null

Open in new window

To me this command should run every hour at +40 minutes.

For some reason though it runs every 15 minutes.

Can anybody see why?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Comment deleted.

AdrianSmithUKAuthor Commented:
Dear woolmilkporc

That's not what you told me in this post - See accepted solution.
That's why I deleted my comment - I was totally on the wrong track - don't have much time at this very moment.
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

Sorry again, I obviously confused root's crontab with the system crontab - I've been in a hurry.

Now that our meeting has been cancelled I'm back.

Your cron job should indeed run every 40 minutes. I don't see any obvious reason why it should do something else.

Maybe you should restart the cron daemon, just to be sure?
Check as root - "crontab -l"
See if the changes you made reflect on the Cron.
AdrianSmithUKAuthor Commented:
Nice to have you back.

I had is set to:

0 * * * *

And it fired every 15 minutes from the hour. (10:00,  10:15 ...etc)

I changed it to

40 * * * *

Now it fires like this (11:40, 11:55 ...etc)
AdrianSmithUKAuthor Commented:
Dear legolasthehansy

[root ~]# crontab -l
[root ~]# 

Open in new window

I'm using Centos 6. When I run the command I get nothing.

Check Cron logs.
Recreate the cron by deleting the entries and restarting CRON and then re-entering it.
Check if another user is running the same script using cron.
"crontab -l" would only work on root's crontab, not on /etc/crontab

Same confusion as mine before.

Did you recycle crond?
AdrianSmithUKAuthor Commented:
Dear legolasthehansy

I looked in /var/log/cron

There is only a record for the hourly cron jobs.

I have Plesk installed. Do you think it could be to blame?
I once read a bug report saying that an empty line just above a job entry could inhbit the correct scheduling of the job.

Could this be the culprit here?
Not sure if Plesk has a utility to setup CRON's. But it should still show up on the files.

If you know the users allowed to access this server,
can you do this,

crontab -l <username1> (This would list the CRON's setup by username1)

You can get the list of users in the server by doing a cat on /etc/passwd and get the list of recent logged in users using the 'last' command.
AdrianSmithUKAuthor Commented:

Thanks for your help.

I never found the solution to the original problem. I tried removing the spare lines, but still had the same problem.

I noticed that plesk runs a backup manager every 15 minutes which might be a clue.

Mar 16 13:16:01 sXXXXXXXX CROND[3453]: (root) CMD ([ -x /usr/local/psa/admin/sbin/backupmng ] && /usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1)
Mar 16 13:31:01 sXXXXXXXX CROND[3453]: (root) CMD ([ -x /usr/local/psa/admin/sbin/backupmng ] && /usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1)

Open in new window

In the end I gave up and I used the built in plesk feature.

I couldn't get it to work though.

In the end I found the problem was that SSH access was switched off for the domain.

Here is the solution:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AdrianSmithUKAuthor Commented:
Great Support!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.