The links can be checked automatically, triggered by the magnolia scheduler module. The check is done by the checkLinkCommand
command. If a link is not reachable and inserted in content somewhere, a message with the error details is sent among the users who have the corresponding roles.
By default the scheduler job is not active and need to be activated, if you want the links checked periodically.
Magnolia Notification
User with the role links-app-magnolia-notifications
will get magnolia notifications, when not reachable links are found.
Mail Notification
User with the role links-app-mail-notifications
will get mail notifications, when not reachable links are found. Please check that your magnolia mail server settings are set correct.
Activate scheduled link check
Set the enabled
property to true
to activate scheduled link check. You also want to change the e-mail sender address to an address your server can handle.
You can do this in two different ways:
Option 1: Edit the links scheduler config file in the resources app
Option 2: Decorate the links scheduler config file in your module
Add this definition to the config file
jobs: checkLinksAppEntries: enabled: false # Set to true to enable description: Check all links in the external-links app command: checkLinkCommand # Every day at 03:00AM: 0 0 3 1/1 * ? * # Every minute: 0 0/1 * 1/1 * ? * # Every hour: 0 0 0/1 1/1 * ? * # See http://www.cronmaker.com cron: 0 0 3 1/1 * ? * # Set your custom check time catalog: default name: checkLinksAppEntries params: recursive: true # Do not edit sendNotification: true # Do not edit sendMail: true # Do not edit mailFrom: "magnolia-cms-links-app@localhost" # Sender e-mail address mailSubject: "Magnolia CMS Links App: Faulty links found, please check" # Mail subject