Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
#!/bin/bash## This script will update participant statuses.# It does this by invoking the appropriate CiviCRM PHP script.# If anything unusual happens, a mail is sent to the system administrator#Program="CiviEvent update wrapper"Directory=`dirname $0`. $Directory/configuration.shSendUrl="${TheHost}${ThePath}/ParticipantProcessor.php?name=${TheUser}&pass=${ThePass}&key=${TheKey}"FilePattern=$TmpDirectory/`basename $0`.$$Document=${FilePattern}.documentLog=${FilePattern}.logStatusLog=${FilePattern}.status.logwget "${SendUrl}" --output-document=$Document --output-file=$LogResult=$?sed -i s/"<br \/>"/\\n/g $Documentif [[ $Result != 0 ]]then echo Failed to connect to CiviCRM echo ' ' echo ---- Return-code returned by wget ---- echo $Result echo ' ' echo ---- Contents of wget log ---- cat $Logelif [[ -s $Document ]]then diff -w $Directory/participant-update-null-result.txt $Document > $StatusLog if [[ -s $StatusLog ]] then echo CiviCRM updated participants echo ' ' echo ----------------------------- echo ' ' cat $Document fielif [[ -e $Document ]]then echo CiviCRM returned an empty result echo ' ' echo ---- Contents of wget log ---- cat $Logelse echo CiviCRM did not return a result echo ' ' echo ---- Contents of wget log ---- cat $Logfirm -f $Document $Log $StatusLog
Updating..Number of Expired registration(s) = 0Number of registration(s) require approval = 0Number of registration changed to Pending from waitlist = 0Participant records updated. (Done)