<< Back
Message for this thread
Posted by Messages text
aedwards

Avatar
Total post : 74
> Profile
Written on : 20/06/2011 22:10 ( more than one month )
Object : Scheduled Reports Not Sending.
I have created a report and setup a daily shcedule, but it isn't working.  I was pretty sure that I had started a forum topic on this before, but could not find it to continue it.  I was told on the last topic to try to upgrade to 3.6.0.5.  I have done so, but the report schedule still isn't working. 

I created the report, and click schedule.  From there I created a schedulation which i named Daily Schedule that sends everyday to myself and one other person.  The Active Check is Green.

Is there anything else that needs to be setup for the schedule to work?

Any help is appreciated.

Thanks.
 
aedwards

Avatar
Total post : 74
> Profile
Written on : 23/06/2011 15:00 ( more than one month )
Object : Re: Scheduled Reports Not Sending.
I have figured out a little about this.  I had missed the last line that said to setup CRON.  I am using a WAMP installation so I used Windows Task Scheduler.  Now I'm seeing a new problem.

I created a batch file that called php.exe and pointed it to the cron.repor.php(c:\xampp\php\php.exe c:\xampp\htdocs\cron\cron.report.php) file and scheduled it to run every night.  I do receive the e-mail when the task runs, but there is not attachement.  During my testing I had pointed to the file in Internet explorer and got the e-mail and the attachement was there.
 
aedwards

Avatar
Total post : 74
> Profile
Written on : 23/06/2011 15:18 ( more than one month )
Object : Re: Scheduled Reports Not Sending.
A little more information....
The batch file was getting an error when it ran that I am attaching below.

C:\>c:\xampp\php\php.exe c:\xampp\htdocs\cron\cron.report.php

Warning: fopen(../files/tmp/782295): failed to open stream: No such file or dire
ctory in C:\xampp\htdocs\doceboCore\lib\lib.upload.php on line 71

Warning: fwrite(): supplied argument is not a valid stream resource in C:\xampp\
htdocs\cron\cron.report.php on line 245

Warning: fclose(): supplied argument is not a valid stream resource in C:\xampp\
htdocs\cron\cron.report.php on line 246
Could not access file: C:\xampp\htdocs\cron/../files/tmp/782295
Report for Don (Weekly Test) Mail sent to : aedwards@nationalservicecenter.com,d
on_fullman@spartancomputer.com
Warning: unlink(C:\xampp\htdocs\cron/../files/tmp/782295): No such file or direc
tory in C:\xampp\htdocs\cron\cron.report.php on line 265

Warning: fopen(../files/tmp/093474): failed to open stream: No such file or dire
ctory in C:\xampp\htdocs\doceboCore\lib\lib.upload.php on line 71

Warning: fwrite(): supplied argument is not a valid stream resource in C:\xampp\
htdocs\cron\cron.report.php on line 245

Warning: fclose(): supplied argument is not a valid stream resource in C:\xampp\
htdocs\cron\cron.report.php on line 246
Could not access file: C:\xampp\htdocs\cron/../files/tmp/093474
Dons Report Mail sent to : xxxxx@xxxxx.com,xxxx@xxxxx.com
Warning: unlink(C:\xampp\htdocs\cron/../files/tmp/093474): No such file or direc
tory in C:\xampp\htdocs\cron\cron.report.php on line 265

C:\>
Message modified by : aedwards on : 23/06/2011 15:22
 
aedwards

Avatar
Total post : 74
> Profile
Written on : 13/07/2011 15:38 ( more than one month )
Object : Re: Scheduled Reports Not Sending.
Ok.  Found some more information. By doing the batch file, the script can't access something it needs.  That is why the script gets the error.  The way I have it setup now is working just fine.

Set up a Scheduled task to run daily and whatever time you want the reports to send.  Personally mine are setup at 12:01AM each day.  Have the task launch internet explorer.  After you have created the task go into the properties.  The task will show that it is running:

C:\PROGRA~1\INTERN~1\iexplore.exe

After this string put in a space and point to the php report cron file as such in quotes.  The string will look like this when you are done.  Of course your file path may be different, but as long as it still points to the file:

C:\PROGRA~1\INTERN~1\iexplore.exe "http://localhost/cron/cron.report.php"

Now there is one last thing that needs to be setup.  The script only take a few seconds to run, BUT there is no close window command or anything in the script, so as far as windows is concerned, even when it is done it is still running, so you have to tell windows to manually kill the task after a given period, i used 10 minutes to make sure it has much more time than it will ever need.  Do this by going to the settings tab in the task.  Check "Stop the task if it runs for: and change it from the default 72 hours to, in my case, 10 minutes.  I also would check to make sure that "Wake the computer to run this task" is checked especially if this task is going to be running in the early morning hours.

So far this has worked perfect for me.
 
<< Back