Forums

Calling a ChronoForms v5 form action using Unix Chron

MainsailSoftware 05 Mar, 2017
I have a situation where I have created an event on an existing CF v5 form that checks for specific values in a database table. I call this event successfully using a button in a CC v5 connection display. When it is called from the CC v5 button, within the CF form event the origin of the call is checked and if called from CC it generates a display of text.

I added a check to see if the CF was called from elsewhere and then instead of generating text, it uses the CF email action to send the admin an email instead. When I call this directly using a browser and a properly formatted URL it works fine.

However, I would like to call this CF event from Unix Chron. I have added an entry in ChronTab that makes the call. I use the same URL that I tested in a browser, but when Chron calls it I get back an email from Cron Daemon that contains HTML that when extracted an placed in an .html file and displayed in a browser has the following message:

Form name can NOT be empty!

The URL used has the following format:

https://myserver.com/joomla/index.php?option=com_chronoforms5&chronoform=MyCF_Form&event=myEvent&tmpl=component&chrono=mySecretKey

The ChronTab entry looks like this:

wget -O - https://myserver.com/joomla/index.php?option=com_chronoforms5&chronoform=MyCfFormName&event=myEvent&tmpl=component&chrono=mySecretKey >/dev/null 2>&1

The rest of the ChronTab scheduling parameter is set to Hours equaling */12. Chron has been making the call properly as scheduled.

Why is his losing the Form name?

Do I need to URL Encode the url I am using?

Or is there a better way to have Chron call the Form Event?
Max_admin 05 Mar, 2017
Hi MainsailSoftware,

If the url works in browser address bar then it should work in the cron, I'm not sure why this error occurs, maybe your webhost admin can check if all the url parameters have been actually passed ?

Try also to point a menu item url, and create a menu item pointing to the form ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.