Skip to main content

Overwrite all 1 minute cron jobs?

Comments

4 comments

  • cPanelLauren
    Hello @tejli You could most likely write something with sed to replace * with */5 How to use sed to find and replace text in files in Linux / Unix shell - nixCraft sed(1) - Linux man page
    0
  • GOT
    The problem you are going to run in to here is each category could and probably does use an asterisk. This SHOULD work, but I only did limited testing, so back up your files first. replace "* * * * *" "*/15 * * * *" -- /var/spool/cron/* Someone may have done something silly so you may also want to run replace "*/1 * * * *" "*/15 * * * *" -- /var/spool/cron/*
    0
  • tejli
    The problem you are going to run in to here is each category could and probably does use an asterisk. This SHOULD work, but I only did limited testing, so back up your files first. replace "* * * * *" "*/15 * * * *" -- /var/spool/cron/* Someone may have done something silly so you may also want to run replace "*/1 * * * *" "*/15 * * * *" -- /var/spool/cron/*

    Thank you!!! As I know this one will replace even hourly or daily crons to 15 min right? replace "* * * * *" "*/15 * * * *" -- /var/spool/cron/* 2: This one will replace cpanel users crons or servers crons only?
    0
  • GOT
    It will not change anything other than the minutely crons. It will change the user crons which includes the user root. But not the system crons in /etc/cron*
    0

Please sign in to leave a comment.