Showing posts with label SMS. Show all posts
Showing posts with label SMS. Show all posts

Send messages in queue immediately

Koha user can send messages in queue due to various reasons. Certain messages in Koha set to send in midnight. Often libraries running Koha on desktop machine shut down PC after working hours. In this situation, messages can't send. If you are also hurry to send messages generated at once, apply following commands:

1. Load environmental variables

sudo su
export PERL5LIB="/usr/share/koha/lib" 
export KOHA_CONF="/etc/koha/sites/library/koha-conf.xml"

2. Push messages in queue

cd /usr/share/koha/bin/cronjobs
./process_message_queue.pl

Warning: When executing the process_message_queue.pl, the library personnel should ensure that no one is trying to check in / out items.

Use of borrowers-force-messaging-defaults script

This script create messaging preferences for all existing borrowers and sets them to default values defined for the category they belong to. Otherwise staff user has to modify the messaging preferences of each patron one by one. Follow the instructions to run the borrowers-force-messaging-defaults script.

Load environment variables

sudo su
export PERL5LIB="/usr/share/koha/lib"
export KOHA_CONF="/etc/koha/sites/library/koha-conf.xml"

Run borrowers-force-messaging-defaults script.

cd /usr/share/koha/bin/maintenance
perl borrowers-force-messaging-defaults.pl --doit

Copy all mobile numbers from "phone" to "smsalertnumber".

Often mobile number of patron entered in the "phone" field in "borrowers" table. Koha users need SMS notifications have to install driver. After the installation of SMS driver, an additonal field "smsalertnumber" will generate. The field does not contain phone number. Where we have to enter the mobile number. Its tedious task to copy each mobile number from the field "phone" to "smsalertnumber". 

Here is an easy method to copy all mobile number from "phone" field to "smsalertnumber". Apply following SQL query:

sudo su
mysql -uroot -p

use koha_library;
UPDATE `borrowers` SET smsalertnumber=phone;
quit


Reference
http://stackoverflow.com/questions/9001939/copy-values-from-one-column-to-another-in-the-same-table