View previous topic :: View next topic |
Author |
Message |
krolik26 n00b


Joined: 23 Mar 2004 Posts: 56 Location: Germany
|
Posted: Fri Nov 23, 2007 12:41 pm Post subject: [Solved] Cron job funktioniert nur jede stunde |
|
|
hallo,
ich hab ein kleines problem, ich verwende vixie-cron, und seit kurzem hab ich versucht
ein script jede 15min ausführen zulassen, und mein cronjob führt das script leider nur jede stunde.
hier mein test:
Code: | linux ~ # crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.XXXXiCz7tG installed on Fri Nov 23 09:41:04 2007)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
1 * * * * /bin/date >> /root/test.log |
ind dem test.log file steht nach einer weile folgendes:
Code: | linux ~ # tail -f test.log
Fri Nov 23 10:01:01 CET 2007
Fri Nov 23 11:01:01 CET 2007
Fri Nov 23 12:01:01 CET 2007
Fri Nov 23 13:01:01 CET 2007 |
und hier noch mein emerge --info:
Code: | linux ~ # emerge --info
Portage 2.1.3.19 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.6.1-r0, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz
Timestamp of tree: Fri, 23 Nov 2007 08:30:06 +0000
app-shells/bash: 3.2_p17
dev-lang/python: 2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox: 1.2.18.1-r2
sys-devel/autoconf: 2.13, 2.61-r1
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool: 1.5.24
virtual/os-headers: 2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="de en"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apache2 automount bcmath berkdb bitmap-fonts bzip2 cli cracklib crypt ctype curl curlwrappers dri exif extensions extraengine fortran gd gdbm gif hash iconv imagemagick imlib inifile innodb isdnlog jpeg jpeg2k json justify libwww logrotate mcve memlimit mhash midi mime mng mounts-check mpm-prefork msession mudflap multiuser mysql mysqli ncurses nls nptl nptlonly openmp pam passwordsave pcre pdf pdflib pdo pear pear-db perl php png posix ppds pppd python readline reflection ruby samba sasl session sharedext sharedmem simplexml slang soap sockets spell spl sqlite sqlite3 ssl symlink tcpd threads tiff tokenizer truetype truetype-fonts type1-fonts unicode userlocales utf8 valias vchroot vhosts wddx x86 xml xml2 xmlreader xmlrpc xmlwriter xorg xpm xsl zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="vesa vga"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY |
ich verstehe einfach nicht, woran es liegen kann.
kann mir jemand helfen, kennt jemand das problem?
danke
Last edited by krolik26 on Fri Nov 23, 2007 1:20 pm; edited 1 time in total |
|
Back to top |
|
 |
toralf Developer


Joined: 01 Feb 2004 Posts: 3943 Location: Hamburg
|
Posted: Fri Nov 23, 2007 1:03 pm Post subject: |
|
|
probier doch mal Code: | 0/15 * * * * /bin/date >> /root/test.log | , vixie macht nämlich genau das, was Du wolltest, zu jeder Stunde (erstes "*"), wenn der Minutenzeiger eine "1" zeigt, das entsprechende Skript auszuführen ... davon abgeseheh "man crontab" ist Dein Freund 
Last edited by toralf on Fri Nov 23, 2007 1:04 pm; edited 1 time in total |
|
Back to top |
|
 |
Gibheer Guru

Joined: 27 Dec 2004 Posts: 300
|
Posted: Fri Nov 23, 2007 1:03 pm Post subject: |
|
|
Code: | 1 * * * * /bin/date >> /root/test.log |
wird eben nur jede Stunde ausgefuehrt. Was du willst ist
Code: | */15 * * * * /bin/date >> /root/test.log |
Findet man auch in der man-page, wenn ich mich nicht irre |
|
Back to top |
|
 |
krolik26 n00b


Joined: 23 Mar 2004 Posts: 56 Location: Germany
|
Posted: Fri Nov 23, 2007 1:20 pm Post subject: |
|
|
vielen dank!
ich hab natürlich die manuals und gentoo-wiki zu dem theme gelesen,
nur leider bin ich nicht sofort drauf gekommen,
dass der crontab "jede erste" und nicht "jede" minute ausführt  |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|