• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Can we change time for daily cronjobs?

Ivo

Basic Pleskian
Hello all

Simple question, I'm sorry if it was answered before.

I'm curios if it is possible to change the time when daily cronjobs (those made by you guys, for instance: 50plesk-daily)

I would like them to start earlier, around midnight and not in morning when most customers come online.

We have a problem on server with resource distribution (long story) and those cronjobs take several hours to finish and they slow down server.
 
Hi Ivo,

sure, you could edit the file "/etc/crontab" - the system-wide crontab.

For example:

You might see something similar in this file:
Code:
...

# m h dom mon dow user    command
00 *    * * *    root    cd / && run-parts --report /etc/cron.hourly >/dev/null 2>&1
00 0    * * *    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) >/dev/null 2>&1
00 0    * * 7    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) >/dev/null 2>&1
00 0    1 * *    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) >/dev/null 2>&1

...

As you can see, the crontabs are defined with:

m = minute
h = hour
dom = day of the month
mon = month
dow = day of the week
user = name of the system-user
command = command to perform​
Pls. change the m/h/dom/mon/dow to YOUR desired time/day/month/day-of-the-month to fit your very own needs and desires. :) ( Pls. keep in mind, that a "*" defines EVERY possible minute/hour/day/month/day-of-the-week and minutes are always defined with a double-number). ;)
 
Hello

Silly me I forgot to mention important part. We use cloudlinux in combination with plesk 12.5.

I'm saying that cause file /etc/crontab is empty, so do you have any idea where else might those cron's be stored? On regular plesk 12.5 crontab indeed looks like you mentioned but here its empty.
 
Hi Ivo,

did you consider to have a look at "/etc/cron.d" ? Or did you consider to use the "locate" - search - command ( requires "mlocate" to be installed on your server - consider to use the forum - search, if you need more informations to installation and usage of "mlocate" ) ?

Code:
locate crontab
 
Back
Top