Custom Jobs Problem: Class does not exist
Permalink
Hello I'm trying to add a custom job to the Automated Jobs page for Concrete 5.7
files is called: import_events_from_lamplight.php and is located in /application/jobs/
Code is below.
When I go to the jobs schedular page i get the following error.
"Class \Application\Job\ImportEventsFromLamplight does not exist"
Any help or pointers would be appreciated.
files is called: import_events_from_lamplight.php and is located in /application/jobs/
Code is below.
<?php namespace Concrete\Job; use \Job as AbstractJob; class ImportEventsFromLamplight extends AbstractJob { /** Returns the job name. * @return string */ public function getJobName() { return t('Import events.'); } /** Returns the job description. * @return string */ public function getJobDescription() { return t('Import events from the lamplight database into concrete5.');
Viewing 15 lines of 25 lines. View entire code block.
When I go to the jobs schedular page i get the following error.
"Class \Application\Job\ImportEventsFromLamplight does not exist"
Any help or pointers would be appreciated.
So for anyone who comes across this post here was my solution.
The problem was a name spacing issue, I would recommend reading the Concrete5.7 coding guidelines
http://www.concrete5.org/documentation/developers/5.7/background/co...
For my issue I simply had to add the following namespace
namespace Application\Job;
so my code looks like this.