Looking to change the ispconfig crons that run at midnight

Discussion in 'ISPConfig 3 Priority Support' started by ronee, Nov 18, 2023.

  1. ronee

    ronee Member HowtoForge Supporter

    Hello, Apologies if this is answered elsewhere but after some searching and reviewing crontab on existing servers did not easily find where the midnight cron is defined.
    I am looking to modify the midnight cron as far as the time it runs.
    Additionally, am looking to disable the awstats job that also runs at midnight as many users have no need of it.
    Much appreciated.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no midnight crontab. The cronjob runs once a minute and the cron plugins have their own schedule (see their source code, at the top of the files). The cron plugins are in the folder /usr/local/ispconfig/server/lib/classes/cron.d/
     
  3. ronee

    ronee Member HowtoForge Supporter

    Thanks very much Till, sorry to belabor the obvious perhaps, so would this work to simply modify the cron schedule in those files? I assume this line: protected $_schedule = '0 0 * * *';
    And perhaps moving the files elsewhere related to unneeded functions such as awstats is sufficient to disable them?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes.


    Yes.

    The only issue is that this can not be done in an update-safe way. You might consider writing a small shell script with a few sed commands inside to change the cron times and rm commands to delete the plugins you don't need and run this after each update.
     

Share This Page