Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: crontab is leeg, toch worden om de 10 minuten scripts gestart  (gelezen 1878 keer)

Offline sneppie

  • Lid
Hallo,

In syslog kom in onderstaande meldingen tegen:
Mar 18 14:20:01 homeserver CRON[12630]: (root) CMD (/var/script/oscamcheck.sh)
Mar 18 14:20:01 homeserver CRON[12631]: (root) CMD (/var/script/CCcamCheck.sh)
Mar 18 14:20:01 homeserver CRON[12627]: (CRON) info (No MTA installed, discarding output)
Mar 18 14:20:01 homeserver CRON[12628]: (CRON) info (No MTA installed, discarding output)

Nu bestaan beide scripts niet, dus dat deze niet succesvol gestart worden is te verklaren. Alleen hoe worden deze scripts automatisch gestart? Crontab -e is leeg (alles begint met #).

Offline Johan van Dijk

  • Administrator
    • johanvandijk
Re: crontab is leeg, toch worden om de 10 minuten scripts gestart
« Reactie #1 Gepost op: 2014/03/18, 17:30:11 »
Kijk eens in /etc/crontab en /etc/cron.d/ daar staan ook cronjobs.

Offline Bloom

  • Lid
Re: crontab is leeg, toch worden om de 10 minuten scripts gestart
« Reactie #2 Gepost op: 2014/03/18, 18:32:46 »
Je kunt cronjobs bekijken met deze terminalopdracht:

1. Voor de gewone gebruiker:
crontab -l
2. Voor de root:
sudo crontab -l

Offline sneppie

  • Lid
Re: crontab is leeg, toch worden om de 10 minuten scripts gestart
« Reactie #3 Gepost op: 2014/03/19, 17:03:50 »
Hallo,

Ik had deze commando's reeds bekeken. Helaas kan ik ze daar niet vinden.

Citaat
richard@homeserver:~$ crontab -l
no crontab for richard
richard@homeserver:~$ sudo crontab -l
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
richard@homeserver:~$

Ook in /etc/cron.d staat niets......

Offline Johan van Dijk

  • Administrator
    • johanvandijk
Re: crontab is leeg, toch worden om de 10 minuten scripts gestart
« Reactie #4 Gepost op: 2014/03/20, 00:55:12 »
Je kan nog proberen of je met een "brute force"-manier iets kan vinden:
sudo grep -r 'oscamcheck.sh' /etc/

Cronjobs van alle gebruikers kan je hiermee opzoeken:
sudo ls -R /var/spool/cron/

Als je hiermee helemaal niks vindt dan weet ik het ook niet meer.

Offline sneppie

  • Lid
Re: crontab is leeg, toch worden om de 10 minuten scripts gestart
« Reactie #5 Gepost op: 2014/03/20, 14:19:07 »
Helaas Johan,

Ook met je commando's is niets te vinden.............


Offline sneppie

  • Lid
Re: crontab is leeg, toch worden om de 10 minuten scripts gestart
« Reactie #7 Gepost op: 2014/03/24, 19:26:41 »
Hoi Bloom, dit laat wat zien:

Citaat
richard@homeserver:~$ cat /etc/crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
56 03 * * * root killall CCcam.x86_64
56 03 * * * root killall oscam
57 03 * * * root /var/script/configupdate.sh >> /var/cccamlog/configupdate.log
58 03 * * * root /var/script/keyupdater.sh
59 03 * * * root /usr/local/bin/CCcam.x86_64
59 03 * * * root /usr/local/bin/oscam -b
*/5 * * * * root /var/script/CCcamCheck.sh
*/5 * * * * root /var/script/OscamCheck.sh
03 04 * * 6 root /var/script/LogCleanUp.sh >> /var/cccamlog/CleanUp.log
richard@homeserver:~$

Ik kan ze alleen niet vinden in /etc/ :D. Enig idee??

Offline Bloom

  • Lid
Re: crontab is leeg, toch worden om de 10 minuten scripts gestart
« Reactie #8 Gepost op: 2014/03/24, 19:50:15 »
ls -l /etc/crontab
Dit toont het bestand crontab in /etc en met cat kon je zijn inhoud al zien.
Dit is de configuratie voor de systeemcron die altijd draait en buiten alle gebruikers om.
Zoals je ziet staan er heel wat opdrachten in. Die worden door het systeem dus volautomatisch uitgevoerd en daar heb je als gebruiker verder geen last van.
Maar het verklaart dus wel de rare cronmeldingen die je in je logs zag staan!

Offline sneppie

  • Lid
Re: crontab is leeg, toch worden om de 10 minuten scripts gestart
« Reactie #9 Gepost op: 2014/03/25, 19:44:52 »
Bedankt!

ik heb crontab aangepast met 'nano /etc/crontab'. Geen vreemde meldingen meer  =D =D