.. index:: single: crontab(Representation) .. _crontab/1: .. rst-class:: right **object** ``crontab(Representation)`` =========================== * ``Representation`` - Text representation. Valid values are ``atom``, ``chars``, and ``codes``. Parser and generator for user and system crontab files. | **Availability:** | ``logtalk_load(crontab(loader))`` | **Author:** Paulo Moura | **Version:** 1:1:2 | **Date:** 2026-10-07 | **Compilation flags:** | ``static, context_switching_calls`` | **Imports:** | ``public`` :ref:`options ` | **Uses:** | :ref:`list ` | :ref:`reader ` | :ref:`type ` | **Remarks:** | (none) | **Inherited public predicates:** |  :ref:`options_protocol/0::check_option/1`  :ref:`options_protocol/0::check_options/1`  :ref:`options_protocol/0::default_option/1`  :ref:`options_protocol/0::default_options/1`  :ref:`options_protocol/0::option/2`  :ref:`options_protocol/0::option/3`  :ref:`options_protocol/0::valid_option/1`  :ref:`options_protocol/0::valid_options/1`   .. contents:: :local: :backlinks: top Public predicates ----------------- .. index:: parse/2 .. _crontab/1::parse/2: ``parse/2`` ^^^^^^^^^^^ Parses a user crontab from the given source using the default options. | **Compilation flags:** | ``static`` | **Template:** | ``parse(Source,Entries)`` | **Mode and number of proofs:** | ``parse(++compound,--list)`` - ``one_or_error`` | **Exceptions:** | ``Source`` is a variable: | ``instantiation_error`` | ``Source`` is neither a variable nor a valid JSON source term: | ``domain_error(json_source,Source)`` | ``Source`` is a valid JSON source term but does not contain parsable JSON: | ``domain_error(json,Source)`` ------------ .. index:: parse/3 .. _crontab/1::parse/3: ``parse/3`` ^^^^^^^^^^^ Parses a crontab from the given source. The supported option is ``format(user)`` (default) or ``format(system)``. | **Compilation flags:** | ``static`` | **Template:** | ``parse(Source,Entries,Options)`` | **Mode and number of proofs:** | ``parse(++compound,--list,+list(compound))`` - ``one_or_error`` | **Exceptions:** | ``Source`` is a variable: | ``instantiation_error`` | ``Source`` is neither a variable nor a valid JSON source term: | ``domain_error(json_source,Source)`` | ``Source`` is a valid JSON source term but does not contain parsable JSON: | ``domain_error(json,Source)`` | ``Options`` is a variable: | ``instantiation_error`` | ``Options`` is neither a variable nor a list: | ``type_error(list,Options)`` | An element ``Option`` of the list ``Options`` is a variable: | ``instantiation_error`` | An element ``Option`` of the list ``Options`` is neither a variable nor a compound term: | ``type_error(compound,Option)`` | An element ``Option`` of the list ``Options`` is a compound term but not a valid option: | ``domain_error(option,Option)`` ------------ .. index:: generate/2 .. _crontab/1::generate/2: ``generate/2`` ^^^^^^^^^^^^^^ Generates a user crontab to the given sink using the default options. | **Compilation flags:** | ``static`` | **Template:** | ``generate(Sink,Entries)`` | **Mode and number of proofs:** | ``generate(+compound,+list)`` - ``one_or_error`` | **Exceptions:** | ``Sink`` is a variable: | ``instantiation_error`` | ``Sink`` is neither a variable nor a valid JSON sink term: | ``domain_error(json_sink,Sink)`` | A JSON version of ``Term`` cannot be generated by the implementation: | ``domain_error(json_term,Term)`` ------------ .. index:: generate/3 .. _crontab/1::generate/3: ``generate/3`` ^^^^^^^^^^^^^^ Generates a crontab to the given sink. The supported option is ``format(user)`` (default) or ``format(system)``. | **Compilation flags:** | ``static`` | **Template:** | ``generate(Sink,Entries,Options)`` | **Mode and number of proofs:** | ``generate(+compound,+list,+list(compound))`` - ``one_or_error`` | **Exceptions:** | ``Sink`` is a variable: | ``instantiation_error`` | ``Sink`` is neither a variable nor a valid JSON sink term: | ``domain_error(json_sink,Sink)`` | A JSON version of ``Term`` cannot be generated by the implementation: | ``domain_error(json_term,Term)`` | ``Options`` is a variable: | ``instantiation_error`` | ``Options`` is neither a variable nor a list: | ``type_error(list,Options)`` | An element ``Option`` of the list ``Options`` is a variable: | ``instantiation_error`` | An element ``Option`` of the list ``Options`` is neither a variable nor a compound term: | ``type_error(compound,Option)`` | An element ``Option`` of the list ``Options`` is a compound term but not a valid option: | ``domain_error(option,Option)`` ------------ .. index:: entry/1 .. _crontab/1::entry/1: ``entry/1`` ^^^^^^^^^^^ True if the argument is a valid crontab entry using the current text representation. | **Compilation flags:** | ``static`` | **Template:** | ``entry(Entry)`` | **Mode and number of proofs:** | ``entry(@nonvar)`` - ``zero_or_one`` ------------ Protected predicates -------------------- (no local declarations; see entity ancestors if any) Private predicates ------------------ (no local declarations; see entity ancestors if any) Operators --------- (none)