Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#8980 closed defect (bug) (fixed)

Scheduled action does not work

Reported by: pavelevap's profile pavelevap Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Plugins Keywords: reporter-feedback
Focuses: Cc:

Description

Hello, I am using scheduled action in my plugin.
When I run this plugin from my admin area, everything works well.
But when I run this function with wp_schedule_event() then copy function does not work for me. Everything before it works, but php copy fails. Thank you for your help...

$fileName = "example.zip";
$serverPath = "http://www.example.com/getfile.do?filename=example.zip";
$localDir = dirname(__FILE__) . "/";
if(!copy($serverPath, $localDir . $fileName)) { die("Copy error"); }

Change History (4)

#1 @DD32
16 years ago

  • Keywords reporter-feedback added

Ok.. So.. Cron is firing, And your script IS running? Its just failing? (Yet works fine when called from within a user-generated action on the admin side?)

To me, It doesn't sound like this is something under WordPress's control, and is more likely something to do with your server setup..

#2 @pavelevap
16 years ago

Yes, cron is firing and working (I checked it also in database - doing_cron). Script works well when running from Wordpress administration, but when running by Wordpress cron feature, then it stops on the line with copy function. I tested it also by adding checks before and after this function. Before this function everything works, but then it stops (probably with die function).

I tried my host environment and also my localhost where almost everything is allowed, but with no success. So, I do not think that it is server problem (or I am not sure exact cause).

#3 @pavelevap
16 years ago

I tried nightly build some days ago and now it looks that everything works.

#4 @Denis-de-Bernardy
16 years ago

  • Milestone 2.8 deleted
  • Resolution set to fixed
  • Status changed from new to closed

closing as fixed then

Note: See TracTickets for help on using tickets.