Two-weekly (!) cronjobs on SUSE 9.1
Hi! I setup a folder named '/etc/cron.twoweekly' and put few scripts into it. To ensure the execution of these files, I made a modification to the '/etc/crontab' file and added the following line 29 21 14,28 * * root rm -f /var/spool/cron/lastrun/cron.twoweekly The extra two-weekly jobs I configured run well, except, that in case in the above timepoint my comp was not turned on, no retry happens after x minutes as it is the case for all of the original cron.hourly/daily/... stuff happens. Any idea how could get the wished effect and get the scripts run when next time my computer is switched on? Thanks, Pelibali
Hi, On Mon, 23 May 2005 21:24:44 +0200 pelibali <.> wrote:
Hi!
I setup a folder named '/etc/cron.twoweekly' and put few scripts into it. To ensure the execution of these files, I made a modification to the '/etc/crontab' file and added the following line
29 21 14,28 * * root rm -f /var/spool/cron/lastrun/cron.twoweekly
The extra two-weekly jobs I configured run well, except, that in case in the above timepoint my comp was not turned on, no retry happens after x minutes as it is the case for all of the original cron.hourly/daily/... stuff happens. Any idea how could get the wished effect and/or get the scripts run when next time my computer is switched on?
Thanks, Pelibali
I'm sorry, just adding a supplementary info I forgot previously. I did also modify my '/usr/lib/cron/run-crons' and inserted the following lines .. for CRONDIR in /etc/cron.{hourly,daily,weekly,twoweekly,monthly} ; do .. cron.twoweekly) TIME="-ctime +14 -or -ctime 14" ;; .. Actually as I understand, that's why my scripts run at all. Pelibali
On Monday 23 May 2005 2:32 pm, pelibali wrote:
I'm sorry, just adding a supplementary info I forgot previously. I did also modify my '/usr/lib/cron/run-crons' and inserted the following lines
.. for CRONDIR in /etc/cron.{hourly,daily,weekly,twoweekly,monthly} ; do .. cron.twoweekly) TIME="-ctime +14 -or -ctime 14" ;; ..
Actually as I understand, that's why my scripts run at all.
You might want to change that to read.... cron.twoweekly) TIME="-cmin +11600 -or -cmin 11600" ;; Plus change the cron.daily and cron.weekly lines to read... cron.daily) TIME="-cmin +1440 -or -cmin 1440" ;; cron.weekly) TIME="-cmin +10080 -or -cmin 10080" ;; See the archived discussion 'cron.daily run time' from earlier this month for the details on why. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-20a-default x86_64
Hi all, I was told, that when building a config for a new kernel, you could use the current kernel-configuration by specifying "make oldconfig" probably i missed something cause it look much differently. Situation: Old 9.0 release (for this i still have to use 2.4 kernel) Default SuSE kernel (still in /usr/src/linux) is linux-2.4.21-70 Its .config is about 47KB in size In my home directory, i got the 2.4.30 tree. After "make mrproper clean", i do a make oldconfig Resulting .config file is just 21KB And its not just the size.
From instalation, it uses, for instance, reiserfs. When browsing through the resulting .config, i noticed that reiserfs was not even set. Many others were also missing.
(just for the sheer curiosity, i did a make dep; make bzImage; make modules modules_install, copied the result to /boot, changed the grub-file and gave it a try. Just as i expected, no show!) I was in the impression that make oldconfig should have been enough, and possibly use make menuconfig to tweak some extra parts.... Wrong? Hans
On Tue, 2005-05-24 at 08:59 +0200, Hans Witvliet wrote:
Hi all,
I was told, that when building a config for a new kernel, you could use the current kernel-configuration by specifying "make oldconfig"
probably i missed something cause it look much differently.
Situation: Old 9.0 release (for this i still have to use 2.4 kernel) Default SuSE kernel (still in /usr/src/linux) is linux-2.4.21-70 Its .config is about 47KB in size
In my home directory, i got the 2.4.30 tree. After "make mrproper clean", i do a make oldconfig Resulting .config file is just 21KB
And its not just the size.
From instalation, it uses, for instance, reiserfs. When browsing through the resulting .config, i noticed that reiserfs was not even set. Many others were also missing.
(just for the sheer curiosity, i did a make dep; make bzImage; make modules modules_install, copied the result to /boot, changed the grub-file and gave it a try. Just as i expected, no show!)
Did you run mk_initrd after copying the files to /boot ? -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998 "The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners." -Ernst Jan Plugge
On Tuesday 24 May 2005 01:59, Hans Witvliet wrote:
Hi all,
I was told, that when building a config for a new kernel, you could use the current kernel-configuration by specifying "make oldconfig"
There is also a "make cloneconfig". I don't know what the difference is but maybe if you give that a try things will work better.
On Tuesday 24 May 2005 07:12 am, Robert Paulsen wrote:
On Tuesday 24 May 2005 01:59, Hans Witvliet wrote:
Hi all,
I was told, that when building a config for a new kernel, you could use the current kernel-configuration by specifying "make oldconfig"
There is also a "make cloneconfig". I don't know what the difference is but maybe if you give that a try things will work better.
Or just copy the config-<version> files out of /boot
Hans Witvliet wrote:
Hi all,
I was told, that when building a config for a new kernel, you could use the current kernel-configuration by specifying "make oldconfig"
probably i missed something cause it look much differently.
Situation: Old 9.0 release (for this i still have to use 2.4 kernel) Default SuSE kernel (still in /usr/src/linux) is linux-2.4.21-70 Its .config is about 47KB in size
In my home directory, i got the 2.4.30 tree. After "make mrproper clean", i do a make oldconfig Resulting .config file is just 21KB
When you run "make oldconfig" it will use the .config that's in the tree or if it's missing, the result is just what you are seeing. You should have done "cp /boot/config-2.4.21-70 /usr/src/linux-2.4.30/.config", then done the "make oldconfig" which tells you it's using the existing .config as a base.
And its not just the size.
From instalation, it uses, for instance, reiserfs. When browsing through the resulting .config, i noticed that reiserfs was not even set. Many others were also missing.
That's the result as explained above.
(just for the sheer curiosity, i did a make dep; make bzImage; make modules modules_install, copied the result to /boot, changed the grub-file and gave it a try. Just as i expected, no show!)
I was in the impression that make oldconfig should have been enough, and possibly use make menuconfig to tweak some extra parts....
Wrong?
Hans
Someone mentioned "make cloneconfig", that's only in a SuSE tree, if you are using a kernel.org tree that wouldn't work, you have to follow the procedure I first outlined above. After you've copied the stuff to /boot, you need to run mkinitrd. I like to preserve my previous setup as a fallback, so I do something like this from the linux-2.4.30 directory --- # cp arch/i386/boot/bzImage /boot/2.4.30 # cp System.map /boot/System.map-2.4.30 # cp .config /boot/config-2.4.30 # vi /boot/grub/menu.lst title 2.4.30 kernel (hd0,0)/boot/2.4.30 root=/dev/hda1 vga=0x317 splash=silent initrd (hd0,0)/boot/initrd-2.4.30 Add lines to menu.lst for 2.4.30 as shown. # cd /boot # mkinitrd -k 2.4.30 -i initrd-2.4.30 -d /dev/hda1 -s 1024x768 Not sure of the syntax for mkinitrd in 9.0, consult the manpage. Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, Keen licensed Private Pilot Retired IBM Mainframes and Sun Servers Tech Support Specialist Microsoft Windows Free Zone - Linux for all Computing Tasks
Hi, On Mon, 23 May 2005 19:06:59 -0700 Scott Leighton <.> wrote:
On Monday 23 May 2005 2:32 pm, pelibali wrote:
I'm sorry, just adding a supplementary info I forgot previously. I did also modify my '/usr/lib/cron/run-crons' and inserted the following lines
.. for CRONDIR in /etc/cron.{hourly,daily,weekly,twoweekly,monthly} ; do .. cron.twoweekly) TIME="-ctime +14 -or -ctime 14" ;; ..
Actually as I understand, that's why my scripts run at all.
You might want to change that to read....
cron.twoweekly) TIME="-cmin +11600 -or -cmin 11600" ;;
Plus change the cron.daily and cron.weekly lines to read...
cron.daily) TIME="-cmin +1440 -or -cmin 1440" ;; cron.weekly) TIME="-cmin +10080 -or -cmin 10080" ;;
See the archived discussion 'cron.daily run time' from earlier this month for the details on why.
Scott
Thanks so much! That time I just simply skipped that thread; I never thought, that I would have to study it carefully:) Pelibali
Hi, On Mon, 23 May 2005 19:06:59 -0700 Scott Leighton <.> wrote:
You might want to change that to read....
cron.twoweekly) TIME="-cmin +11600 -or -cmin 11600" ;;
Just for the record. After I just copy-pasted the values, realized, that 11600 minutes ne two weeks :( That should be 20160 as it is exactly twice the value of a 'single' week, 10080... But thanks anyway, Pelibali
On Tuesday 24 May 2005 1:12 pm, pelibali wrote:
Hi,
On Mon, 23 May 2005 19:06:59 -0700
Scott Leighton <.> wrote:
You might want to change that to read....
cron.twoweekly) TIME="-cmin +11600 -or -cmin 11600" ;;
Just for the record. After I just copy-pasted the values, realized, that 11600 minutes ne two weeks :( That should be 20160 as it is exactly twice the value of a 'single' week, 10080...
<Blush> You're right. I don't know what my fingers were thinking when I wrote that out, I know my brain was thinking 'twice the weekly amount'..... Glad you caught it quickly. Sorry for the glaring error. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-20a-default x86_64
participants (7)
-
Bruce Marshall
-
Hans Witvliet
-
Ken Schneider
-
pelibali
-
Robert Paulsen
-
Scott Leighton
-
Sid Boyce