if you read the above posts the problem is.
that the cronjobs (mainly imscp cronjobs are sheduled @weekly/@daily....
in etc/crontab i define when weekly and dailys should run, but that doesn't seems to work right, because they run at 0.00 am instead of the specific time..
Posts by batZen
-
-
i know, but they run at 0.00 thats my problem
i want them to run in the in etc/crontab specified time -
hat zufällig jemand eine Idee warum die @daily und @weekly cronjobs sich nicht an die werte von etc/crontab halten und um 0 Uhr durchlaufen?
---
someone have a clue why the @daily and @weekly cronjobs not run at in /etc/crontab specified time? instead they run at 0:00 am...
-
Hey guys,
in the default config this is stated for the SA learn cronjob
if you set the following with the default values -> * */12 * * * it will be executed every minute at 12h and again at 24h.
Think minute should be Set to something like "0" in the default config.
-
Code
- # /etc/crontab: system-wide crontab
- # Unlike any other crontab you don't have to run the `crontab'
- # command to install the new version when you edit this file
- # and files in /etc/cron.d. These files also have username fields,
- # that none of the other crontabs do.
- SHELL=/bin/sh
- PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
- # m h dom mon dow user command
- 17 * * * * root cd / && run-parts --report /etc/cron.hourly
- 25 5 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
- 47 5 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
- 52 5 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
- #
-
Sorry @Nuxwin
after getting some sleep i checked again and i somehow connected to a old server. Sorry for Posting the wrong /etc/cron.d/imscp file... here is the right one:
Code: /etc/cron.d/imscp/- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin# Traffic accounting0,30 * * * * root perl /var/www/imscp/engine/traffic/imscp-srv-traff > /var/log/imscp/imscp-srv-traff.log 2>&10,30 * * * * root perl /var/www/imscp/engine/traffic/imscp-vrl-traff > /var/log/imscp/imscp-vrl-traff.log 2>&1# Quota accounting@daily root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/engine/quota/imscp-dsk-quota > /var/log/imscp/imscp-dsk-quota.log 2>&1# Disable expired accounts@daily root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/engine/tools/imscp-disable-accounts >/dev/null 2>&1# Backup i-MSCP configuration files and database@daily root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/engine/backup/imscp-backup-imscp > /var/log/imscp/imscp-backup-imscp-mngr.log 2>&1# Remove configuration backups older than 7 days@weekly root find /etc/imscp/*/backup -type f -mtime +7 -regextype sed -regex '.*/.*[0-9]\{10\}$' -exec rm -- {} +# Remove i-MSCP backups older than 7 days@weekly root find /var/www/imscp/backups -type f -mtime +7 -exec rm -- {} +# Remove backend Logs older than 7 days@weekly root find /var/log/imscp -type f -mtime +7 -exec rm -- {} +# Backup customers' data depending of the domain properties40 4 * * * root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/engine/backup/imscp-backup-all > /var/log/imscp/imscp-backup-all-mngr.log 2>&1# imscp [Package::AntiRootkits::Chkrootkit] entry BEGIN@weekly root nice -n 15 ionice -c2 -n5 bash chkrootkit -e > /var/log/chkrootkit.log 2>&1# imscp [Package::AntiRootkits::Chkrootkit] entry ENDING# imscp [Package::AntiRootkits::Rkhunter] entry BEGIN@weekly root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/engine/PerlLib/Package/AntiRootkits/Rkhunter/Cron.pl > /dev/null 2>&1# imscp [Package::AntiRootkits::Rkhunter] entry ENDING# imscp [Package::Webstats::Awstats] entry BEGIN15 3-21/6 * * * root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/engine/PerlLib/Package/Webstats/Awstats/Scripts/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl > /dev/null 2>&1# imscp [Package::Webstats::Awstats] entry ENDING# imscp [Plugin::SpamAssassin::DiscoverRazor] entry BEGIN@weekly root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/SpamAssassin/cronjobs/cronjob_discover_razor.pl >/dev/null 2>&1# imscp [Plugin::SpamAssassin::DiscoverRazor] entry ENDING# imscp [Plugin::SpamAssassin::CleanBayesDb] entry BEGIN@daily root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/SpamAssassin/cronjobs/cronjob_clean_bayes_db.pl >/dev/null 2>&1# imscp [Plugin::SpamAssassin::CleanBayesDb] entry ENDING# imscp [Plugin::SpamAssassin::BayesSaLearn] entry BEGIN* */12 * * * root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/SpamAssassin/cronjobs/cronjob_bayes_sa-learn.pl >/dev/null 2>&1# imscp [Plugin::SpamAssassin::BayesSaLearn] entry ENDING# imscp [Plugin::RoundcubePlugins::pop3fetcher] entry BEGIN*/15 * * * * root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/RoundcubePlugins/cronjob/cronjob_pop3fetcher.pl >/dev/null 2>&1# imscp [Plugin::RoundcubePlugins::pop3fetcher] entry ENDING# imscp [Plugin::LetsEncrypt::pending] entry BEGIN0 * * * * root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/LetsEncrypt/cronjobs/pending.pl > /dev/null 2>&1# imscp [Plugin::LetsEncrypt::pending] entry ENDING# imscp [Plugin::LetsEncrypt::renew] entry BEGIN@daily root nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/LetsEncrypt/cronjobs/renew.pl > /dev/null 2>&1# imscp [Plugin::LetsEncrypt::renew] entry ENDING
Problem is still that daily and weekly cronjobs running at 0:00 and not at 5-6 am like in crontab defined.but crons run at 0:00...
-
hm my problem is that they should run according to crontab file in the morning hours between 5 and 6 am.... but as you see in the logs they run at 0:00...
-
Code: /etc/cron.d/imscp
- # Quota
- @daily root /var/www/imscp/engine/quota/imscp-dsk-quota &>/var/log/imscp/imscp-dsk-quota.log
- # Traffic accounting (updated every 30 minutes)
- 0,30 * * * * root /var/www/imscp/engine/traffic/imscp-srv-traff &>/var/log/imscp/imscp-srv-traff.log
- 0,30 * * * * root /var/www/imscp/engine/traffic/imscp-vrl-traff &>/var/log/imscp/imscp-vrl-traff.log
- # Customer logs
- @daily root /var/www/imscp/engine/tools/imscp-httpd-logs-mngr &>/var/log/imscp/imscp-httpd-logs-mngr.log
- # Backup for all the customers' data depending of the domain properties
- 40 4 * * * root /var/www/imscp/engine/backup/imscp-backup-all yes &>/var/log/imscp/imscp-backup-all-mngr.log
- # Backup for i-MSCP database and all /etc/imscp/* configuration files
- @weekly root /var/www/imscp/engine/backup/imscp-backup-imscp noreport &>/var/log/imscp/imscp-backup-imscp-mngr.log
- # Remove config backups older than 7 days
- @daily root find /etc/imscp/*/backup/* -maxdepth 0 -type f -mtime +7 -print | egrep '.*\.[0-9]+$' | xargs -r /bin/rm
- # Remove Daemon Logs older than 7 days (except .gz files)
- @daily root find /var/log/imscp/* -maxdepth 1 -type f -mtime +7 -print | egrep '.*\.gz$' | xargs -r /bin/rm
- # Disable entities (dmn, als, sub, alssub and mail) of expired accounts
- @daily root /var/www/imscp/engine/tools/imscp-disable-accounts >/dev/null 2>&1
- # Look for and purge old PHP sessions every 30 minutes
- 0,30 * * * * root /var/www/imscp/engine/tools/imscp-del-tmp >/dev/null 2>&1
- # imscp [Addons::Webstats::Awstats] entry BEGIN
- 15 3-21/6 * * * root /usr/bin/perl /var/www/imscp/engine/PerlLib/Addons/Webstats/Awstats/Scripts/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl >/dev/null 2>&1
- # imscp [Addons::Webstats::Awstats] entry ENDING
- # imscp [Addons::AntiRootkits::Rkhunter] entry BEGIN
- @weekly root /usr/bin/nice -n 19 /usr/bin/perl /var/www/imscp/engine/PerlLib/Addons/AntiRootkits/Rkhunter/Cron.pl >/dev/null 2>&1
- # imscp [Addons::AntiRootkits::Rkhunter] entry ENDING
- # imscp [Addons::AntiRootkits::Chkrootkit] entry BEGIN
- @weekly root /usr/bin/nice -n 19 /usr/sbin/chkrootkit 1> /var/log/chkrootkit.log 2>&1
- # imscp [Addons::AntiRootkits::Chkrootkit] entry ENDING
- # imscp [{ENTRY_ID}] entry BEGIN
- # imscp [{ENTRY_ID}] entry ENDING
-
Hallo zusammen,
ich nutze aktuell
imscp 1.3.0
auf debian jessieIch habe immer von der Nacht von Samstag auf Sonntag mit sehr hoher Serverlast zu kämpfen und zwar genau um 0:00 Uhr.... wenn das um 5 Uhr passieren würde wäre das kein Problem, aber so schon. Problem scheint zu sein das alle weekly Cronjobs zu der Zeit starten:
Code- Aug 14 00:00:02 menkisyscloudsrv33 CRON[25844]: (root) CMD (nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/LetsEncrypt/cronjobs/pending.pl > /dev/null 2>&1)Aug 14 00:00:03 menkisyscloudsrv33 CRON[25847]: (root) CMD (nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/SpamAssassin/cronjobs/cronjob_clean_bayes_db.pl >/dev/null 2>&1)Aug 14 00:00:05 menkisyscloudsrv33 CRON[25850]: (root) CMD (nice -n 15 ionice -c2 -n5 bash chkrootkit -e > /var/log/chkrootkit.log 2>&1)Aug 14 00:00:06 menkisyscloudsrv33 CRON[25851]: (root) CMD (nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/SpamAssassin/cronjobs/cronjob_bayes_sa-learn.pl >/dev/null 2>&1)Aug 14 00:00:14 menkisyscloudsrv33 CRON[25860]: (root) CMD (nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/SpamAssassin/cronjobs/cronjob_discover_razor.pl >/dev/null 2>&1)Aug 14 00:00:14 menkisyscloudsrv33 CRON[25862]: (root) CMD (find /var/www/imscp/backups -type f -mtime +7 -exec rm -- {} +)Aug 14 00:00:14 menkisyscloudsrv33 CRON[25863]: (root) CMD (nice -n 15 ionice -c2 -n5 perl /var/www/imscp/engine/PerlLib/Package/AntiRootkits/Rkhunter/Cron.pl > /dev/null 2>&1)Aug 14 00:00:14 menkisyscloudsrv33 CRON[25865]: (root) CMD (nice -n 15 ionice -c2 -n5 perl /var/www/imscp/engine/backup/imscp-backup-imscp > /var/log/imscp/imscp-backup-imscp-mngr.log 2>&1)Aug 14 00:00:15 menkisyscloudsrv33 CRON[25867]: (root) CMD (nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/RoundcubePlugins/cronjob/cronjob_pop3fetcher.pl >/dev/null 2>&1)Aug 14 00:00:15 menkisyscloudsrv33 CRON[25869]: (root) CMD (nice -n 15 ionice -c2 -n5 perl /var/www/imscp/engine/tools/imscp-disable-accounts >/dev/null 2>&1)Aug 14 00:00:15 menkisyscloudsrv33 CRON[25870]: (root) CMD (nice -n 15 ionice -c2 -n5 perl /var/www/imscp/engine/quota/imscp-dsk-quota > /var/log/imscp/imscp-dsk-quota.log 2>&1)Aug 14 00:00:15 menkisyscloudsrv33 CRON[25871]: (root) CMD (find /etc/imscp/*/backup -type f -mtime +7 -regextype sed -regex '.*/.*[0-9]\{10\}$' -exec rm -- {} +)Aug 14 00:00:15 menkisyscloudsrv33 CRON[25861]: (root) CMD (nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/LetsEncrypt/cronjobs/renew.pl > /dev/null 2>&1)Aug 14 00:00:15 menkisyscloudsrv33 CRON[25880]: (root) CMD (find /var/log/imscp -type f -mtime +7 -exec rm -- {} +)Aug 14 00:00:15 menkisyscloudsrv33 CRON[25882]: (root) CMD (perl /var/www/imscp/engine/traffic/imscp-vrl-traff > /var/log/imscp/imscp-vrl-traff.log 2>&1)Aug 14 00:00:16 menkisyscloudsrv33 CRON[25891]: (root) CMD (perl /var/www/imscp/engine/traffic/imscp-srv-traff > /var/log/imscp/imscp-srv-traff.log 2>&1)Aug 14 00:01:07 menkisyscloudsrv33 CRON[25902]: (root) CMD (nice -n 15 ionice -c2 -n5 perl /var/www/imscp/gui/plugins/SpamAssassin/cronjobs/cronjob_bayes_sa-learn.pl >/dev/null 2>&1)
ich würde diese ganzen Backups cronjobs lieber zwischen 5 und 6 laufen lassen dementsprechend ist auch der eintrag in etc/crontabCode- # /etc/crontab: system-wide crontab
- # Unlike any other crontab you don't have to run the `crontab'
- # command to install the new version when you edit this file
- # and files in /etc/cron.d. These files also have username fields,
- # that none of the other crontabs do.
- SHELL=/bin/sh
- PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
- # m h dom mon dow user command
- 17 * * * * root cd / && run-parts --report /etc/cron.hourly
- 25 5 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
- 47 5 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
- 52 5 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
- #
leider scheint dies wie man an der o. g. log sehen kann nicht zu funktionieren. Hat jemand ne Idee was ich übersehe? -
Ich denke am meisten Probleme macht der Speicherverbrauch von owncloud ich habe damals das Dataverzeichnis an einen anderen Ort verschoben. Wichtig ist nur die entsprechenden Berechtigungen zu setzen, den neuen Pfad in die open_basedir aufzunehmen und die config von owncloud anzupassen.