OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Documentation and Translation (Moderator: fabian) »
  • cron log
« previous next »
  • Print
Pages: [1]

Author Topic: cron log  (Read 10910 times)

Ricardo

  • Full Member
  • ***
  • Posts: 233
  • Karma: 12
    • View Profile
cron log
« on: November 27, 2018, 01:11:17 pm »
Hello all,

I am trying to find the log that contains all the "cron" output, but I am unable to find it anywhere.

/var/log does not hold any file that contains the string "cron" as content. Also
1) system/settings/logging
2) system/settings/cron
neither contain option to activate such cron logging.

Can someone point me to any documentation about this topic?
Logged

Ricardo

  • Full Member
  • ***
  • Posts: 233
  • Karma: 12
    • View Profile
Re: cron log
« Reply #1 on: December 10, 2018, 09:33:56 pm »
Am I missing something obvious, or that question is really that impossible to answer?

/var/log/<something with the name "cron" in it> is indeed a valid file in normal freebsd, so my question cannot be that stupid.
Logged

lewi3069

  • Newbie
  • *
  • Posts: 15
  • Karma: 2
    • View Profile
Re: cron log
« Reply #2 on: December 15, 2018, 09:16:26 pm »
I'm interested in the location of this log as well.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: cron log
« Reply #3 on: December 16, 2018, 08:06:15 pm »
We do not have a cron log. For all the activities the log locations are System or Backend log.


Cheers,
Franco
Logged

Ricardo

  • Full Member
  • ***
  • Posts: 233
  • Karma: 12
    • View Profile
Re: cron log
« Reply #4 on: December 17, 2018, 11:32:14 am »
Quote from: franco on December 16, 2018, 08:06:15 pm
We do not have a cron log. For all the activities the log locations are System or Backend log.


Cheers,
Franco

Is it intentional to not have log about cron activity? How can custom cron jobs be debugged, as I could not see any cron-related entry neither in System nor in Backend?
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: cron log
« Reply #5 on: January 02, 2019, 05:45:18 pm »
I would lie if I said this was intentional to be left out. But it's likely true that it was not implemented because it was never strictly required dating back to m0n0wall.

Not opposed to a cron log feature, but someone would have to write it and help deal with the "fallout" of both current and future scripting in this area.


Cheers,
Franco
Logged

vaygr

  • Newbie
  • *
  • Posts: 2
  • Karma: 1
    • View Profile
Re: cron log
« Reply #6 on: August 25, 2024, 06:40:20 pm »
I added this config for cron support (/usr/local/etc/syslog-ng.conf.d/syslog-ng-cron.conf):

Code: [Select]
filter f_cron { facility(cron); };

destination d_local_cron {
  file(
    "/var/log/cron/cron_${YEAR}${MONTH}${DAY}.log"
    create-dirs(yes)
    flags(syslog-protocol)
  );
};

log {
  source(s_all);
  filter(f_cron);
  destination(d_local_cron);
};

Unfortunately there's no way to add this to the application list for remote logging, so you ether have to add a duplicate destination or use the generated one by opnsense:

Code: [Select]
…
  destination(d_6bf9323eda944bbd9b28befeb8e2ce55);
…
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Documentation and Translation (Moderator: fabian) »
  • cron log
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2