# Tâches Cron

#### **1.RÔLE DE LA TÂCHE PLANIFIÉE**

La tâche planifiée (cron job) complète le système de webhooks en effectuant régulièrement les opérations suivantes :

- **Synchronisation des paiements**<span style="white-space: pre-wrap;"> : vérifie les paiements qui n'auraient pas été détectés par webhook</span>
- **Révocation automatique**<span style="white-space: pre-wrap;"> : supprime les liens expirés selon le délai configuré</span>
- **Mise à jour des statuts**<span style="white-space: pre-wrap;"> : actualise les informations depuis Bridge</span>
- **Nettoyage**<span style="white-space: pre-wrap;"> : archive les anciennes données</span>

La tâche planifiée est un filet de sécurité. Les webhooks sont instantanés, mais en cas de problème réseau ou de défaillance, la tâche planifiée assure que rien n'est perdu.

#### **2.CONFIGURATION DE LA TÂCHE**

**Menu :** **Accueil → Outils Administrations → Travaux planifiées**

### Paramètres

<table id="bkmrk-param%C3%A8trevaleur-reco" style="width: 100%; border-collapse: collapse; margin-top: 15px;"><colgroup><col style="width: 30%;"></col><col></col></colgroup><tbody><tr style="background-color: rgb(245, 245, 245);"><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); font-weight: 600; color: rgb(51, 51, 51); width: 30%;">Paramètre

</td><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); font-weight: 600; color: rgb(51, 51, 51);">Valeur recommandée

</td></tr><tr style="background-color: white;"><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); color: rgb(102, 102, 102); font-weight: 600;">Nom

</td><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); color: rgb(102, 102, 102);">Récupération des paiements Bridge

</td></tr><tr style="background-color: rgb(249, 249, 249);"><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); color: rgb(102, 102, 102); font-weight: 600;">Fréquence

</td><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); color: rgb(102, 102, 102);">Toutes les jours

</td></tr><tr style="background-color: white;"><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); color: rgb(102, 102, 102); font-weight: 600;">Statut

</td><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); color: rgb(76, 175, 80); font-weight: 600;">Activé

</td></tr><tr style="background-color: rgb(249, 249, 249);"><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); color: rgb(102, 102, 102); font-weight: 600;">Priorité

</td><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); color: rgb(102, 102, 102);">55 (par défaut)

</td></tr></tbody></table>

#### **3.ACTIVATION DE LA TÂCHE**

1. <span style="white-space: pre-wrap;">Allez dans </span>**Accueil → Outils Administrations → Travaux planifiées**
2. <span style="white-space: pre-wrap;">Recherchez </span>**"Récupération des paiements Bridge"**
3. Cliquez sur l'icône pour activer la tâche (elle passe en vert)
4. <span style="white-space: pre-wrap;">Définissez la fréquence : recommandé </span>**300 secondes (5 minutes)**
5. Sauvegardez

La tâche s'exécutera automatiquement selon la fréquence définie. Vous pouvez aussi l'exécuter manuellement en cliquant sur "Exécuter maintenant".

#### **4.SURVEILLANCE DE L'EXÉCUTION**

***Consulter l'historique***

Dans la liste des tâches planifiées, cliquez sur la tâche pour voir :

- Date et heure de la dernière exécution
- Date de la prochaine exécution
- Nombre d'exécutions
- Durée d'exécution moyenne
- Statut de la dernière exécution (succès/erreur)

***Indicateurs de bon fonctionnement***

<table id="bkmrk-%E2%9C%93-normalla-t%C3%A2che-s%27e" style="width: 100%; border-collapse: collapse; margin-top: 15px;"><colgroup><col style="width: 30%;"></col><col></col></colgroup><tbody><tr style="background-color: white;"><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); vertical-align: top; width: 30%; font-weight: 600; color: rgb(76, 175, 80);">✓ Normal

</td><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); vertical-align: top; color: rgb(102, 102, 102);">La tâche s'exécute régulièrement, statut "Succès", durée stable

</td></tr><tr style="background-color: rgb(255, 243, 224);"><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); vertical-align: top; font-weight: 600; color: rgb(255, 152, 0);">⚠ Attention

</td><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); vertical-align: top; color: rgb(102, 102, 102);">Durée d'exécution anormalement longue → vérifiez les logs

</td></tr><tr style="background-color: rgb(255, 235, 238);"><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); vertical-align: top; font-weight: 600; color: rgb(244, 67, 54);">✗ Problème

</td><td style="padding: 10px; border: 1px solid rgb(221, 221, 221); vertical-align: top; color: rgb(102, 102, 102);">Statut "Erreur" ou pas d'exécution depuis longtemps → consultez les logs

</td></tr></tbody></table>

#### **5.EXÉCUTION MANUELLE**

***Quand l'utiliser ?***

- Pour tester le bon fonctionnement de la tâche
- Après une configuration ou mise à jour
- Pour forcer une synchronisation immédiate
- En cas de problème détecté

***Procédure***

1. Allez dans la liste des tâches planifiées
2. Trouvez la tâche InfraS2Bridge
3. <span style="white-space: pre-wrap;">Cliquez sur </span>**"Exécuter maintenant"**
4. La tâche s'exécute immédiatement
5. Consultez le résultat dans l'historique