Link to home
Start Free TrialLog in
Avatar of Member_2_4942450
Member_2_4942450

asked on

Adjusting Cron Jobs ?

I am trying to edit this cron job to execuit every 30 days because I am getting to many alurts evey 8 hrs from what it is showing me

0 8,20 * * * /root/rkhunter.sh

now I tried
crontab -e

Then I went to that line and put
0 0,30 * * * /root/rkhunter.sh

When I went to save it gave me the below error

"/tmp/crontab.XXXXdksuZh":3: bad hour
errors in crontab file, can't install.
Do you want to retry the same edit?
Enter Y or N

clear                                                          root@server [~]# crontab -l
0 4 * * * /usr/sbin/cxs --upgrade --quiet
0 8,20 * * * /root/chkrootkit.sh | grep -v .packlist
0 8,20 * * * /root/rkhunter.sh

0 1 * * * /root/mysql.sh > /dev/null 2>&1
8,23,38,53 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
*/5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1
2,58 * * * * /usr/local/bandmin/bandmin
0 0 * * * /usr/local/bandmin/ipaddrmap
26 3 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
36 6 * * * cd /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/scripts/ ; /usr/local/cpanel/3rdparty/bin/php-cgi cron.php > /dev/null 2>&1


10 7 * * * cd /usr/local/assp;perl /usr/local/assp/rebuildspamdb.pl
MAILTO=""
*/59 * * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/ex_localdomains.php clean_logs=yes daniolo=yes
*/3 * * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/update_email.php
*/3 * * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/status.php long=1 daniolo=yes
*/4 * * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/spam_cronjob.php high=7
10 8 * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/clear_spambox.php sday=3 sp=yes limitspace=10000 remdays=1
*/20 * * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/find_abusers.php sw=7 sc=8 er=13 lm=13 dc=8 rl=20 dn=1 on=1
*/27 * * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/find_abusers.php show=2 sc=2 dm=file er=6 lm=4 dc=2 on=1
0 9 * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/signatures.php
2 */6 * * * /usr/sbin/exiqgrep -o 16800 -i | /usr/bin/xargs /usr/sbin/exim -Mrm
MAILTO=""
30 */4 * * * /usr/bin/test -x /scripts/update_db_cache && /scripts/update_db_cache
45 */8 * * * /usr/bin/test -x /usr/local/cpanel/bin/optimizefs && /usr/local/cpanel/bin/optimizefs
0 1 * * * /scripts/cpbackup
35 * * * * /usr/bin/test -x /usr/local/cpanel/bin/tail-check && /usr/local/cpanel/bin/tail-check
30 */2 * * * /usr/local/cpanel/bin/mysqluserstore >/dev/null 2>&1
15 */2 * * * /usr/local/cpanel/bin/dbindex >/dev/null 2>&1
11 4 * * * /usr/bin/freshclam --quiet --no-warnings
0 5 * * * /scripts/upcp
0 6 * * * /scripts/exim_tidydb > /dev/null 2>&1
root@server [~]#

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of simon3270
simon3270
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_4942450
Member_2_4942450

ASKER

Thanks .. I will give it a try in a few something just came up.
30 is an invalid hour. you need to play with the next filed which is for days of the month
I put everything to just * for this line below and I am still getting cron reports

as follows how can I disable these too many

[ Rootkit Hunter version 1.3.8 ]

Checking rkhunter data files...
  Checking file mirrors.dat                                  [ No update ]
  Checking file programs_bad.dat                             [ No update ]
  Checking file backdoorports.dat                            [ No update ]
  Checking file suspscan.dat                                 [ No update ]
  Checking file i18n/cn                                      [ No update ]
  Checking file i18n/de                                      [ No update ]
  Checking file i18n/en                                      [ No update ]
  Checking file i18n/zh                                      [ No update ]
  Checking file i18n/zh.utf8                                 [ No update ]
[ Rootkit Hunter version 1.3.8 ]
File updated: searched for 164 files, found 141
Warning: The SSH configuration option 'PermitRootLogin' has not been set.
         The default value may be 'yes', to allow root access.
Warning: Hidden directory found: /dev/.udev
Warning: Hidden file found: /etc/.logrotate.conf.swp: data
Warning: Hidden file found: /usr/bin/.ssh.hmac: ASCII text
Warning: Hidden file found: /usr/bin/.fipscheck.hmac: ASCII text
Warning: Hidden file found: /usr/sbin/.sshd.hmac: ASCII text

0 8,20 * * * /root/rkhunter.sh

Open in new window

0 20 2 * *  /root/chkrootkit.sh | grep -v .packlist
0 20 2 * * /root/rkhunter.sh

Now I have this and its running over and over and over doesn't seem to stop
The ones above (in ID:34951846) should be fine - both will run the script at 8pm on the second of the month.

If you have
    * * * * * /root/rkhunter.sh
it will run every minute.
Have you left old rkhunter lines in your crontab?
No left over lines in my crontab.

***** that explains it
Didn't know * meant every min

So you would say the best way would be commit it out if I don't want to use it right?

Thanks
Commenting out with # would be fine - I do that if I have an entry I don't want now, but may want again later.