10931 Posts in 2614 Topics by 1810 members
|Go to End|
10 December 2013 at 10:15pm Last edited: 10 December 2013 10:18pm
I've got problems using this module on SS 3.0.8. I've created a "class VacancyPage extends Page" pagetype that needs unpublished at a certain date. (I'm using the https://github.com/silverstripe-australia/advancedworkflow module in combination with the silverstripe-queuedjobs module for running the unpublish job.
The job for this gets created ok but when it's due i get the following error:
[Error] Broken jobs were found in the job queue
[2013-12-09 23:59:01][ERROR] Job caused exception Class VacancyPage does not exist in /public_html/framework/control/injector/Injector.php at line 846
[2013-12-09 23:59:01][INFO] Job paused at 2013-12-09 23:59:01
I've done a /dev/build and ?flush=1 and the VacancyPages are in use on the site without issues. When I run /dev/tasks/ProcessJobQueueTask it says "No new jobs" but I receive the broken jobs error email.
Pressing what looks like a'reload job' button in the browser interface and then 'playing' the job makes it run successfully.
Any idea how I get my job to run successfully?
10 December 2013 at 10:22pm
I don't have any experience with the queuedjobs module, but as it runs tasks from the command line you could try setting $_FILE_TO_URL_MAPPING and see if that helps. I'd also try flushing from the command line (I don't think this should actually change anything, but worth a shot):
php /your/site/dir/framework/cli-script.php dev/build flush=1
10 December 2013 at 10:28pm
I have the $_FILE_TO_URL_MAPPING in place in the _ss_environment.php:
$_FILE_TO_URL_MAPPING['/siteroot'] = 'http://www.the.site';
I run the cronjob like this:
* * * * * [/siteroot]/framework/sake dev/tasks/ProcessJobQueueTask >/dev/null 2>&1
I've done a build+flush via the commandline see if that helps.
10 December 2013 at 10:32pm Last edited: 10 December 2013 10:33pm
Possibly the problem is that I run the cron job in the root's crontab but that the dev/build flush=1 was not done by this user. This solved another problem I was having so awaiting my next job to see if its working now. if this doesn't work then I will move the cronjob to the www-data user which runs the webserver.
23 February 2014 at 2:44am
I can confirm that the solution is to add the cron to (in my case) the user the web server is run under (www-data for ubuntu server):
sudo -u www-data crontab -e
When flushing / dev/building in the browser the www-data user is used so this then prepares the cron job.
|Go to Top|