| 1 |
|
| 2 |
Timers |
| 3 |
------ |
| 4 |
|
| 5 |
LL::NG use timers (or cron jobs) to: |
| 6 |
|
| 7 |
- purge old sessions |
| 8 |
- clean Handler cache |
| 9 |
|
| 10 |
.. attention:: |
| 11 |
|
| 12 |
Depending on your OS and LL:NG version, you may still be using cron jobs. Section `Cron jobs`_ |
| 13 |
Jobs were handled through cron jobs for versions older than: |
| 14 |
|
| 15 |
- Debian: **2.18.0** |
| 16 |
- Red Hat/Rocky Linux: **2.19.0** |
| 17 |
|
| 18 |
|
| 19 |
Edit systemd timers |
| 20 |
~~~~~~~~~~~~~~~~~~~ |
| 21 |
|
| 22 |
If you need to modify the frequence of execution: |
| 23 |
|
| 24 |
|
| 25 |
.. code-block:: bash |
| 26 |
|
| 27 |
systemd edit liblemonldap-ng-portal-perl.timer |
| 28 |
systemd edit liblemonldap-ng-handler-perl.timer |
| 29 |
|
| 30 |
.. attention:: |
| 31 |
|
| 32 |
Names used here are for Debian family distributions, in RHEL they are named: |
| 33 |
|
| 34 |
- lemonldap-ng-portal.timer |
| 35 |
- lemonldap-ng-handler.timer |
| 36 |
|
| 37 |
For example: |
| 38 |
|
| 39 |
.. code-block:: bash |
| 40 |
|
| 41 |
[Timer] |
| 42 |
OnCalendar=*-*-* *:07:07 |
| 43 |
|
| 44 |
Cron jobs |
| 45 |
~~~~~~~~~ |
| 46 |
|
| 47 |
As stated above, for older LL:NG versions, the timers were handled by cron jobs. If you need to modify the frequence of execution: |
| 48 |
|
| 49 |
.. code-block:: bash |
| 50 |
|
| 51 |
vi /etc/cron.d/liblemonldap-ng-portal-perl |
| 52 |
vi /etc/cron.d/liblemonldap-ng-handler-perl |
| 53 |
|
| 54 |
.. code-block:: bash |
| 55 |
|
| 56 |
7 * * * * www-data [ -x /usr/share/lemonldap-ng/bin/purgeCentralCache ] && if [ ! -d /run/systemd/system ]; then /usr/share/lemonldap-ng/bin/purgeCentralCache; fi |