[opensuse] Setting day of week for weekly security check?
Hello,
I thought I read on this list how to do this, but I can not seem to find
it in the archives. I already have the time set for daily tasks and it
works well. The machine has been doing things with 10.3 really well, but
when I upgrade this machine to OpenSUSE 11.0, it wants to do this Monday
mornings. That is when I finished the update/upgrade. I have tried to
remove the cron.weekly on friday evening at 23:45, but the file is
recreated but the weekly cronjob still runs on Monday morning at about
6:00 AM MDT. This really interfeers with work. I really need this task
to be run Saturday Morning at 12:15 AM. I have 5 TB drives and 4 512 GB
drives. It takes the task a long time to complete. How do I force the
weekly job to run at the time I want?
Thanks,
--
Boyd Gerber
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2008-07-28 at 11:06 -0600, Boyd Lynn Gerber wrote:
mornings. That is when I finished the update/upgrade. I have tried to remove the cron.weekly on friday evening at 23:45, but the file is recreated but the weekly cronjob still runs on Monday morning at about 6:00 AM MDT. This really interfeers with work. I really need this task to be run Saturday Morning at 12:15 AM. I have 5 TB drives and 4 512 GB drives. It takes the task a long time to complete. How do I force the weekly job to run at the time I want?
Interesting question. In "/var/spool/cron/lastrun/" I have: - -rw-r--r-- 1 root root 0 Jul 26 22:15 cron.daily - -rw-r--r-- 1 root root 0 Jul 22 22:00 cron.monthly the timestamps record the day the jobs last run. The weekly one I know that run this early morning, but there is no timestamp file. I don't understand why not :-? - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIjgqjtTMYHG2NR9URAjr6AJoCxcmZjYJluK/IB292xP7zyJFf6wCdGSlZ gr/1aIH0dRjPJtmABS3BDTc= =wQkr -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 28 Jul 2008, Carlos E. R. wrote:
The Monday 2008-07-28 at 11:06 -0600, Boyd Lynn Gerber wrote:
mornings. That is when I finished the update/upgrade. I have tried to remove the cron.weekly on friday evening at 23:45, but the file is recreated but the weekly cronjob still runs on Monday morning at about 6:00 AM MDT. This really interfeers with work. I really need this task to be run Saturday Morning at 12:15 AM. I have 5 TB drives and 4 512 GB drives. It takes the task a long time to complete. How do I force the weekly job to run at the time I want?
Interesting question.
In "/var/spool/cron/lastrun/" I have:
- -rw-r--r-- 1 root root 0 Jul 26 22:15 cron.daily - -rw-r--r-- 1 root root 0 Jul 22 22:00 cron.monthly
the timestamps record the day the jobs last run. The weekly one I know that run this early morning, but there is no timestamp file. I don't understand why not :-?
This is what I have
ssh suse104 ls -la /var/spool/cron/lastrun/ total 8 drwxr-xr-x 2 root root 4096 Jul 28 21:15 . drwx------ 4 root root 4096 Jun 6 16:29 .. -rw-r--r-- 1 root root 0 Jul 28 00:00 cron.daily -rw-r--r-- 1 root root 0 Jul 28 21:00 cron.hourly -rw-r--r-- 1 root root 0 Jun 28 17:45 cron.monthly -rw-r--r-- 1 root root 0 Jul 26 00:15 cron.weekly
But ps -ef gives me...
root 30653 1 0 01:00 ? 00:00:00 /bin/sh -c test -x
/usr/lib/secchk/security-control.sh && /usr/lib/secchk/security-control.sh
weekly &
root 30692 30653 0 01:00 ? 00:00:00 /bin/sh
/usr/lib/secchk/security-control.sh weekly
root 30709 30692 0 01:00 ? 00:00:00 /bin/sh
/usr/lib/secchk/security-control.sh weekly
root 30710 30709 0 01:00 ? 00:00:00 /bin/sh
/usr/lib/secchk/security-weekly.sh
root 10890 30710 0 18:15 ? 00:00:00 /bin/sh
/usr/lib/secchk/security-weekly.sh
root 10891 10890 1 18:15 ? 00:02:56 find /dev/ / /MNT0 /MNT1
/MNT2 /home /master /working /suse104main /suse104mainbak /zenezdomain
/xenau105 -mount ( -perm -30 -o -perm -3 ) -type f
root 10892 10890 0 18:15 ? 00:00:00 sort
root 10893 10890 0 18:15 ? 00:00:00 xargs ls -cdl
--time-style=long-iso --no_run-if-empty --
Which shows that it is running today. It started around 1:00 AM from the
above, but the system became sluggish around 6:00 AM.
--
Boyd Gerber
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2008-07-28 at 22:25 -0600, Boyd Lynn Gerber wrote:
This is what I have
ssh suse104 ls -la /var/spool/cron/lastrun/ total 8 drwxr-xr-x 2 root root 4096 Jul 28 21:15 . drwx------ 4 root root 4096 Jun 6 16:29 .. -rw-r--r-- 1 root root 0 Jul 28 00:00 cron.daily -rw-r--r-- 1 root root 0 Jul 28 21:00 cron.hourly -rw-r--r-- 1 root root 0 Jun 28 17:45 cron.monthly -rw-r--r-- 1 root root 0 Jul 26 00:15 cron.weekly
So last time it run was last Saturday. The file is created just before the script runs. And after it runs, I see the script deletes the file if it is dated in the future.
But ps -ef gives me... root 30653 1 0 01:00 ? 00:00:00 /bin/sh -c test -x /usr/lib/secchk/security-control.sh && /usr/lib/secchk/security-control.sh weekly &
So it is running now. Weird!
Which shows that it is running today. It started around 1:00 AM from the above, but the system became sluggish around 6:00 AM.
I like using "ps afx | less -S", because it would identify the children. There is an entry in the messages log file that should tell you the exact time it started; try: grep weekly /var/log/messages | less -S My guess is that yours takes a long time to execute. You will not have "john" installed? It does a weekly test for weak passwords, and it may takes days to complete. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIjulFtTMYHG2NR9URAjCQAKCOoh92til9WWheCKpnYBBvatT9/gCfd/Dp Kfgx75EZdfVzI1PjaHcQdHA= =sNGD -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 29 Jul 2008, Carlos E. R. wrote:
The Monday 2008-07-28 at 22:25 -0600, Boyd Lynn Gerber wrote:
ssh suse104 ls -la /var/spool/cron/lastrun/ total 8 drwxr-xr-x 2 root root 4096 Jul 28 21:15 . drwx------ 4 root root 4096 Jun 6 16:29 .. -rw-r--r-- 1 root root 0 Jul 28 00:00 cron.daily -rw-r--r-- 1 root root 0 Jul 28 21:00 cron.hourly -rw-r--r-- 1 root root 0 Jun 28 17:45 cron.monthly -rw-r--r-- 1 root root 0 Jul 26 00:15 cron.weekly
So last time it run was last Saturday. The file is created just before the script runs. And after it runs, I see the script deletes the file if it is dated in the future.
But it really did not run till Monday. root 30653 1 0 Jul28 ? 00:00:00 /bin/sh -c test -x /usr/lib/secchk/security-control.sh && /usr/lib/secchk/security-control.sh weekly & root 30692 30653 0 Jul28 ? 00:00:00 /bin/sh /usr/lib/secchk/security-control.sh weekly root 30709 30692 0 Jul28 ? 00:00:00 /bin/sh /usr/lib/secchk/security-control.sh weekly root 30710 30709 0 Jul28 ? 00:00:00 /bin/sh /usr/lib/secchk/security-weekly.sh and
I like using "ps afx | less -S", because it would identify the children.
30653 ? S 0:00 /bin/sh -c test -x /usr/lib/secchk/security-control. 30692 ? S 0:00 \_ /bin/sh /usr/lib/secchk/security-control.sh weekl 30709 ? S 0:00 \_ /bin/sh /usr/lib/secchk/security-control.sh w 30710 ? S 0:00 \_ /bin/sh /usr/lib/secchk/security-weekly.s 28329 ? S 0:00 \_ /bin/sh /usr/lib/secchk/security-week 28330 ? DN 5:52 \_ find /dev/ / /MNT0 /MNT1 /MNT2 /h 28331 ? S 0:00 \_ sort
There is an entry in the messages log file that should tell you the exact time it started; try: grep weekly /var/log/messages | less -S
Jul 28 01:00:01 suse104 /usr/sbin/cron[30649]: (root) CMD ( test -x /usr/lib/sec Same as above. It started on Monday.
My guess is that yours takes a long time to execute. You will not have "john" installed? It does a weekly test for weak passwords, and it may takes days to complete.
It does. It is still running as shown above. That is why I really need
it to run on Saturday. I have not made an entry in the root crontab to
try and force it to run on Saturdays. This really is strange.
Thanks,
--
Boyd Gerber
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-07-29 at 10:47 -0600, Boyd Lynn Gerber wrote:
-rw-r--r-- 1 root root 0 Jul 28 21:00 cron.hourly -rw-r--r-- 1 root root 0 Jun 28 17:45 cron.monthly -rw-r--r-- 1 root root 0 Jul 26 00:15 cron.weekly
So last time it run was last Saturday. The file is created just before the script runs. And after it runs, I see the script deletes the file if it is dated in the future.
But it really did not run till Monday.
...
There is an entry in the messages log file that should tell you the exact time it started; try: grep weekly /var/log/messages | less -S
Jul 28 01:00:01 suse104 /usr/sbin/cron[30649]: (root) CMD ( test -x /usr/lib/sec
Same as above. It started on Monday.
I don't understand...
My guess is that yours takes a long time to execute. You will not have "john" installed? It does a weekly test for weak passwords, and it may takes days to complete.
It does. It is still running as shown above. That is why I really need it to run on Saturday. I have not made an entry in the root crontab to try and force it to run on Saturdays. This really is strange.
It is indeed strange. It might be buggy. You could try touching the flag file to change the date to the previous saturday, to see if it runs on this saturday. It used to work with the daily jobs on previous versions... - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD4DBQFIj7IPtTMYHG2NR9URAs75AJ46rUq220JAsYsllhDqQh7PReGewwCVHwY/ jidpWQAa1hlf/pIHt5h4Dg== =DMVs -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Boyd Lynn Gerber wrote:
Hello,
I thought I read on this list how to do this, but I can not seem to find it in the archives. I already have the time set for daily tasks and it works well. The machine has been doing things with 10.3 really well, but when I upgrade this machine to OpenSUSE 11.0, it wants to do this Monday mornings. That is when I finished the update/upgrade. I have tried to remove the cron.weekly on friday evening at 23:45, but the file is recreated but the weekly cronjob still runs on Monday morning at about 6:00 AM MDT. This really interfeers with work. I really need this task to be run Saturday Morning at 12:15 AM. I have 5 TB drives and 4 512 GB drives. It takes the task a long time to complete. How do I force the weekly job to run at the time I want?
As user root "crontab -e". Then simply set the options for that. See "man 5 crontab" for details. Fields are listed from left to right: minutes hours days_of_month month day_of_week command In your case you probably want: 15 12 * * 7 /path/to/command/to/execute Results will be mailed as usual to root. I've given up using /etc/cron.daily for time-critical jobs. -- Sandy List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Boyd Lynn Gerber
-
Carlos E. R.
-
Sandy Drobic