Time Condition BLF Hint not updating until call received

I went back to the installation guide I followed to see why the home directory was not there.

https://wiki.freepbx.org/display/FOP/Installing+FreePBX+13+on+CentOS+6#InstallingFreePBX13onCentOS6-AddtheAsteriskUser

I saw that the adduser command did have the -m which should have created the directory. But I looked at the history and saw that Andrew had just a few days ago corrected the command from -M to -m. I guess that is what happened.

https://wiki.freepbx.org/pages/diffpagesbyversion.action?pageId=61800790&selectedPageVersions=20&selectedPageVersions=19

@jlarge Did you also build your system from source and not the ISO distro?

It happened again this morning. It was fixed by an inbound call before I could run the command. Sorry for the unformatted post, having some issues with that.

I think my issue is different than np_pyroā€™s. My system does have an ā€˜/home/asteriskā€™ directory however it is empty. If I run the ā€˜crontab -l -u asterisk | grep schedtcā€™ no results are returned.

If I remove the grep and just eyeball it there are 15 lines and I donā€™t see anything similar in there.

If I review the /var/log/cron, I do see the command being ran, ā€˜Aug 11 08:43:01 cog-voip-01 CROND[18250]: (asterisk) CMD ([ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php)ā€™ including the version I have that is manually running the ā€˜/var/lib/asterisk/bin/schedtc.php --debugā€™ every 5 minutes.

If I grep those logs though for schedtc though, ā€˜grep schedtc /var/log/cronā€™ the results stop a few days ago.

I did not compile from source. It is a very old freepbx distro installed from iso that has been through a large number of updates. I am running:
*PBX Firmware: 10.13.66-20
*Asterisk: 11
*Framework: 13.0.192.9

The issue occurred again this morning and the user reporting it said it happens every day. Iā€™m not sure thatā€™s true, but possibly every day recently based on what I am seeing in the logs. If I run through ā€˜grep schedtc /var/log/cron*ā€™ the last time I see it run is on Aug 9, which is the same as it was from my post on Aug 11. It looks like once the issue starts, it wonā€™t resolve until I manually run the command.

The questions Iā€™d like to see answered are:

  1. Is crond failing? If the cron program is stopping, your cron jobs will not run.
  2. check the existence and permissions on the file /var/www/html/admin/modules/dashboard/scheduler.php to make sure it is executable and exists. If itā€™s executable, it probably exists, so ā€¦

As a ā€œbandaidā€ fix, Iā€™d start watching crond to make sure it is running all the time.

2 Likes

Hate to drag up an old thread but am running 13.0.31.11 Time Conditions and seem to be seeing the exact same issue as described. The BLF/Hints seem to work for a random period of time and then just stop working. Honestly itā€™s probably been going on since the original post was made but weā€™ve just started using time conditions again within the past couple of months, so nobody had BLFā€™s defined.

Started running through some of the troubleshooting above and could swear that asteriskā€™s crontab did not have the schedtc line in it when I first checked. Then I noticed that there were again cron entries popping up in the log and when I looked sure enough the schedtc entry was in asteriskā€™s crontab. No way to tell if it was my imagination or not since asteriskā€™s crontab seems to be updated once a minute. Will definitely be checking for that first next time it stops working.

Blockquote
Oct 20 04:56:01 fpbx01 CROND[16483]: (asterisk) CMD ([ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php)
Oct 20 04:57:01 fpbx01 CROND[16564]: (asterisk) CMD ([ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php)
Oct 20 04:58:01 fpbx01 CROND[16653]: (asterisk) CMD ([ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php)
Oct 20 04:59:01 fpbx01 CROND[16754]: (asterisk) CMD ([ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php)
Oct 20 05:00:01 fpbx01 CROND[16843]: (asterisk) CMD ([ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php)
Oct 22 12:41:01 fpbx01 CROND[7175]: (asterisk) CMD ([ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php)
Oct 22 12:42:01 fpbx01 CROND[7289]: (asterisk) CMD ([ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php)
Oct 22 12:43:01 fpbx01 CROND[7437]: (asterisk) CMD ([ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php)
Oct 22 12:44:01 fpbx01 CROND[7528]: (asterisk) CMD ([ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php)
Oct 22 12:45:01 fpbx01 CROND[7627]: (asterisk) CMD ([ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php)

You can see it just stopped after the 5:00 entry on Oct 20th and started again at 12:41 today.

Thoughts?

Just happened again, exactly as before. System is now running 3.1.34.11 Time Conditions

Time Conditions BLFs were not working, checked asteriskā€™s crontab and the schedtc line was NOT there.

Ran /var/lib/asterisk/bin/schedtc.php --debug

The Time Condition BLFs immediately updated and started working, and asteriskā€™s crontab once again contained the schedtc line.

Mike

Iā€™ve tried to reproduce this several different ways and have been unable to. Please ensure the setting of: fwconsole setting TCMAINT

This is not a valid version of timeconditions.

Another occurrence, left it since Friday to settle itself, it did not. Sorry, typo before, Time Conditions 3.0.34.11

> [root@fpbx01 ~]# fwconsole setting TCMAINT
> Setting of "TCMAINT" is (bool)[true]

> [root@fpbx01 ~]# crontab -l -u asterisk | grep schedtc

> [root@fpbx01 ~]# /var/lib/asterisk/bin/schedtc.php --debug
> Time Now:11:53|Mon|26|Nov|America/Edmonton
> 
> ==Working with TimeCondition:IUL Open/Closed==
> INVERTED BLF: false (NOT_INUSE = NOT_INUSE & INUSE = INUSE)
> OVERRIDE MODE: not set
> =>08:00-17:00|mon-fri|*|* is now
> TIME MATCHED: True (NOT_INUSE)
> BLF MODE: True (NOT_INUSE)
> Privilege: Command
> Changing TC8 to NOT_INUSE

> [root@fpbx01 ~]# crontab -l -u asterisk | grep schedtc
> * * * * * [ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php

Again not a valid version of Time Conditions.

ļø Time Conditions 13.0.34.11 Stable Sangoma Technologies Corporation GPLv3+ Enabled