Author | Topic: CXP Automated tasks? | |
---|---|---|
Stephen Bryan | CXP Automated tasks? on Fri, 13 Mar 2015 11:03:19 -0400 Is there a way to do an automated task such as updating a database, or sending an email at a specified time within CXP? Stephen Bryan | |
Nestor G. Torres | Re: CXP Automated tasks? on Mon, 16 Mar 2015 19:16:44 +0200 Hi Stephen, Maybe you can do something with this sample snippet I put together for you. I am sure you can work in a date : /* Read your cEvent_Time from your parameter dbf file... format of cEvent_Time "HH:MM" */ nSec_Curr:=TimeToSec(Time()) nSec_Event:=TimeToSec(cEvent_Time) nSec_Wait:=nSec_Event - nSec_Curr If nSec_Wait < 1 nSec_Wait := 1 Endif nSec_Wait:=nSec_Wait*100 && Make it into 100th's of seconds Sleep(nSec_Wait) /* After the Wait sleep do what you want */ On 2015/03/13 05:03 PM, "Stephen Bryan" wrote: > Is there a way to do an automated task such as updating a database, or > sending an email at a specified time within CXP? > > Stephen Bryan > | |
Stephen Bryan | Re: CXP Automated tasks? on Tue, 31 Mar 2015 08:37:14 -0400 Thank you for the response Nestor. I understand the logic of your code snippet but could this be in a /CXP application or would it require an Xbase++ app running in the background on the server? Basically what I'm trying to do is: I've written a /CXP web application for a satellite TV installation company to help them keep track of inventory on each of their technician's trucks. Part of it includes the ability to count inventory from their smart phones and allows the operations manager to see what each technician has counted for the day by combining them into one report grid. Since this is done each morning they want it to zero out the counts automatically which clears the previous days data. This is to force the technician to count each morning rather than just manipulating the previous days count. They also want it to email the operations manager when a technician has failed to complete his inventory count by a certain time. Can this be done without having a program running in the background on the server? Stephen >"Nestor G. Torres" wrote in message >news:1bbe4f42$6a3d5552$3b69f@news.alaska-software.com... >Hi Stephen, >Maybe you can do something with this sample snippet I put together for you. >I am sure you can work in a date : >/* Read your cEvent_Time from your parameter dbf file... format of >cEvent_Time "HH:MM" */ >nSec_Curr:=TimeToSec(Time()) >nSec_Event:=TimeToSec(cEvent_Time) >nSec_Wait:=nSec_Event - nSec_Curr >If nSec_Wait < 1 > nSec_Wait := 1 >Endif >nSec_Wait:=nSec_Wait*100 && Make it into 100th's of seconds >Sleep(nSec_Wait) >/* After the Wait sleep do what you want */ >On 2015/03/13 05:03 PM, "Stephen Bryan" wrote: > Is there a way to do an automated task such as updating a database, or > sending an email at a specified time within CXP? > > Stephen Bryan > | |
Nestor G. Torres | Re: CXP Automated tasks? on Wed, 01 Apr 2015 09:13:17 +0200 Hi Stephen, The way you have described the process I would develop an xBase program to run as a service on the CXP server. In this way no one could easily switch off or tamper with the monitoring and email processes. The monitoring and email process would automatically start-up each time the server is restarted and would remain processing in the background. Another purpose of this process would be to reset the counters in the early morning hours when no one is working and to do other automated processing tasks. The CXP application would be used for capturing the counts of inventory as you have written. That is the way I would approach it. Kind regards, Nestor On 2015/03/31 02:37 PM, "Stephen Bryan" wrote: > Thank you for the response Nestor. > > I understand the logic of your code snippet but could this be in a /CXP > application or would it require an Xbase++ app running in the background > on the server? > > Basically what I'm trying to do is: I've written a /CXP web application > for a satellite TV installation company to help them keep track of > inventory on each of their technician's trucks. Part of it includes the > ability to count inventory from their smart phones and allows the > operations manager to see what each technician has counted for the day > by combining them into one report grid. > Since this is done each morning they want it to zero out the counts > automatically which clears the previous days data. This is to force the > technician to count each morning rather than just manipulating the > previous days count. They also want it to email the operations manager > when a technician has failed to complete his inventory count by a > certain time. > > Can this be done without having a program running in the background on > the server? > > Stephen > > > >> "Nestor G. Torres" wrote in message >> news:1bbe4f42$6a3d5552$3b69f@news.alaska-software.com... > >> Hi Stephen, > >> Maybe you can do something with this sample snippet I put together for >> you. I am sure you can work in a date : > >> /* Read your cEvent_Time from your parameter dbf file... format of >> cEvent_Time "HH:MM" */ > >> nSec_Curr:=TimeToSec(Time()) >> nSec_Event:=TimeToSec(cEvent_Time) >> nSec_Wait:=nSec_Event - nSec_Curr > >> If nSec_Wait < 1 >> nSec_Wait := 1 >> Endif > >> nSec_Wait:=nSec_Wait*100 && Make it into 100th's of seconds > >> Sleep(nSec_Wait) > >> /* After the Wait sleep do what you want */ > >> On 2015/03/13 05:03 PM, "Stephen Bryan" wrote: >> Is there a way to do an automated task such as updating a database, or >> sending an email at a specified time within CXP? >> >> Stephen Bryan >> > | |
Stephen Bryan | Re: CXP Automated tasks? on Wed, 01 Apr 2015 09:43:39 -0400 That is what I expected but was hoping there may be another way. Stephen >"Nestor G. Torres" wrote in message >news:6f413e17$42a290f0$1664b6@news.alaska-software.com... >Hi Stephen, >The way you have described the process I would develop an xBase program to >run as a service on the CXP server. In this way no one could easily switch >off or tamper with the monitoring and email processes. The monitoring and >email process would automatically start-up each time the server is >restarted and would remain processing in the background. Another purpose >of this process would be to reset the counters in the early morning hours >when no one is working and to do other automated processing tasks. >The CXP application would be used for capturing the counts of inventory as >you have written. >That is the way I would approach it. >Kind regards, >Nestor On 2015/03/31 02:37 PM, "Stephen Bryan" wrote: > Thank you for the response Nestor. > > I understand the logic of your code snippet but could this be in a /CXP > application or would it require an Xbase++ app running in the background > on the server? > > Basically what I'm trying to do is: I've written a /CXP web application > for a satellite TV installation company to help them keep track of > inventory on each of their technician's trucks. Part of it includes the > ability to count inventory from their smart phones and allows the > operations manager to see what each technician has counted for the day > by combining them into one report grid. > Since this is done each morning they want it to zero out the counts > automatically which clears the previous days data. This is to force the > technician to count each morning rather than just manipulating the > previous days count. They also want it to email the operations manager > when a technician has failed to complete his inventory count by a > certain time. > > Can this be done without having a program running in the background on > the server? > > Stephen > > > >> "Nestor G. Torres" wrote in message >> news:1bbe4f42$6a3d5552$3b69f@news.alaska-software.com... > >> Hi Stephen, > >> Maybe you can do something with this sample snippet I put together for >> you. I am sure you can work in a date : > >> /* Read your cEvent_Time from your parameter dbf file... format of >> cEvent_Time "HH:MM" */ > >> nSec_Curr:=TimeToSec(Time()) >> nSec_Event:=TimeToSec(cEvent_Time) >> nSec_Wait:=nSec_Event - nSec_Curr > >> If nSec_Wait < 1 >> nSec_Wait := 1 >> Endif > >> nSec_Wait:=nSec_Wait*100 && Make it into 100th's of seconds > >> Sleep(nSec_Wait) > >> /* After the Wait sleep do what you want */ > >> On 2015/03/13 05:03 PM, "Stephen Bryan" wrote: >> Is there a way to do an automated task such as updating a database, or >> sending an email at a specified time within CXP? >> >> Stephen Bryan >> > |