.. 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:0:0
| **Date:** 2026-09-09

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Imports:**
|    ``public`` :ref:`options <options/0>`
| **Uses:**
|    :ref:`list <list/0>`
|    :ref:`reader <reader/0>`
|    :ref:`type <type/0>`

| **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``


------------

.. 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)`` - ``one_or_error``


------------

.. 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``


------------

.. 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)`` - ``one_or_error``


------------

.. 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)

