Errors in crontab file, can't install - No changes can be saved

Ever since upgrading to 15, we can’t apply any new config changes for the system. Anyone have a fix for this? I see many other people who have the same issue but no one has a fix.

##################CONSOLE COMMAND AND OUTPUT############
[[email protected] ~]# fwconsole reload --verbose
Reload Started

In Cron.class.php line 126:

[Exception]
Cron line added didn’t remain in crontab on final check. Check /tmp/cron.error for reason.

Exception trace:
() at /var/www/html/admin/libraries/BMO/Cron.class.php:126
FreePBX\Cron->addLine() at /var/www/html/admin/libraries/BMO/Cron.class.php:226
FreePBX\Cron->add() at /var/www/html/admin/libraries/Builtin/UpdateManager.php:242
FreePBX\Builtin\UpdateManager->updateCrontab() at /var/www/html/admin/libraries/Console/Reload.class.php:822
FreePBX\Console\Command\Reload->installCrons() at /var/www/html/admin/libraries/Console/Reload.class.php:371
FreePBX\Console\Command\Reload->reload() at /var/www/html/admin/libraries/Console/Reload.class.php:90
FreePBX\Console\Command\Reload->execute() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:960
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:255
Symfony\Component\Console\Application->doRun() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:148
Symfony\Component\Console\Application->run() at /var/lib/asterisk/bin/fwconsole:163

reload [–json] [–dry-run] [–skip-registry-checks] [–dont-reload-asterisk]

####### CRON ERROR LOG #####
“-”:16: bad day-of-month
errors in crontab file, can’t install.
“-”:18: bad day-of-month
errors in crontab file, can’t install.
“-”:19: bad day-of-month
errors in crontab file, can’t install.
“-”:18: bad day-of-month
errors in crontab file, can’t install.
“-”:18: bad day-of-month
errors in crontab file, can’t install.
“-”:18: bad day-of-month
errors in crontab file, can’t install.
“-”:18: bad day-of-month
errors in crontab file, can’t install.
“-”:18: bad day-of-month
errors in crontab file, can’t install.
“-”:18: bad day-of-month
errors in crontab file, can’t install.
“-”:19: bad day-of-month
errors in crontab file, can’t install.
“-”:19: bad day-of-month
errors in crontab file, can’t install.

####### CRONTAB CONFIG FILE #######
*/1 * * * * /var/lib/asterisk/bin/pagepro-scheduler.php 2>&1 >/dev/null

          • [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php > /dev/null 2>&1
            @daily [ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php
            @daily [ -x /var/lib/asterisk/agi-bin/ddns_client.php ] && /var/lib/asterisk/agi-bin/ddns_client.php
            */15 * * * * [ -e /etc/asterisk/firewall.enabled ] && touch /var/spool/asterisk/incron/firewall.firewall
            @daily [ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php >/dev/null 2>&1
            @hourly [ -x /var/lib/asterisk/bin/storage.php ] && /var/lib/asterisk/bin/storage.php >/dev/null 2>&1
            45 23 5 * * /usr/sbin/fwconsole backup --backup=95231e16-b53b-4df6-90c4-7c3351ba5c82 > /dev/null 2>&1
            */1 * * * * /usr/sbin/fwconsole calendar --sync 2>&1 > /dev/null
            3 0 * * * /usr/sbin/fwconsole certificates --updateall -q 2>&1 >/dev/null
            @daily [ -x /var/lib/asterisk/bin/freepbx_sipstation_check ] && /var/lib/asterisk/bin/freepbx_sipstation_check 2>&1 > /dev/null
            */15 * * * * /usr/sbin/fwconsole userman --syncall -q
            @daily /usr/sbin/fwconsole pms mk_dirty > /dev/null 2>&1
          • /usr/sbin/fwconsole pms wu_alert > /dev/null 2>&1
            @daily [ -x /var/lib/asterisk/agi-bin/update_license.php ] && /var/lib/asterisk/agi-bin/update_license.php --delay
          • [ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php
          • [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php > /dev/null 2>&1
  • 1 * * * /usr/sbin/fwconsole util cleanplaybackcache -q

Fix by upgrading: Backup and Restore Module Broken Post-FreePBX Version Upgrade

i did this and i’m running Backup & Restore - 15.0.8.17. same error when i try to save and push changes. please advise.

anyone?

your post is less than clear try over posting the content of

crontab -l -u asterisk

but surround it with ‘backticks’

this info was added above but here it is again as requested

[[email protected] ~]# crontab -l -u asterisk
*/1 * * * * /var/lib/asterisk/bin/pagepro-scheduler.php 2>&1 >/dev/null
* * * * * [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php > /dev/null 2>&1
@daily  [ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php
@daily  [ -x /var/lib/asterisk/agi-bin/ddns_client.php ] && /var/lib/asterisk/agi-bin/ddns_client.php
*/15 * * * * [ -e /etc/asterisk/firewall.enabled ] && touch /var/spool/asterisk/incron/firewall.firewall
@daily  [ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php >/dev/null 2>&1
@hourly  [ -x /var/lib/asterisk/bin/storage.php ] && /var/lib/asterisk/bin/storage.php >/dev/null 2>&1
45 23 5 * * /usr/sbin/fwconsole backup --backup=95231e16-b53b-4df6-90c4-7c3351ba5c82  > /dev/null 2>&1
*/1 * * * * /usr/sbin/fwconsole calendar --sync 2>&1 > /dev/null
3 0 * * * /usr/sbin/fwconsole certificates --updateall -q 2>&1 >/dev/null
@daily [ -x /var/lib/asterisk/bin/freepbx_sipstation_check ] && /var/lib/asterisk/bin/freepbx_sipstation_check 2>&1 > /dev/null
*/15 * * * * /usr/sbin/fwconsole userman --syncall -q
@daily /usr/sbin/fwconsole pms mk_dirty > /dev/null 2>&1
* * * * * /usr/sbin/fwconsole pms wu_alert > /dev/null 2>&1
* * * * * [ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php
* * * * * [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php > /dev/null 2>&1
* 2 * * * /usr/sbin/fwconsole util cleanplaybackcache -q
@daily  [ -x /var/lib/asterisk/agi-bin/update_license.php ] && /var/lib/asterisk/agi-bin/update_license.php --delay
[[email protected] ~]#

Well , crontabs are purely ascii , if not they don’t work. What you posted is not ascii

Well that actually all parses well (in debian) the only thing I would quibble with is the */1 for the minute field it is technically correct but stupid. the day-of-month or dom is the third field

Do you still get an error? (or maybe the php code has been fixed and it now works)

i commented out it all and still errors

I would take it to the author :wink:

what?

The authors are Sangoma, the crontab itself parses fine.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.