Fatal Error when including suiteCRM default module classes

I am writing a php script in side custom\Extension\modules\Schedulers\Ext\ScheduledTasks\my_task.php. In that I have included following lines of code


And when I run the script it says…

Fatal error: require_once(): Failed opening required ‘modules/Accounts/Account.php’ (include_path=’.;C:\php\pear’) in my file…

why it’s happening like this and how to sort this out?


Everything under /Ext/ directories is supposedly generated automatically during a Quick Repair and Rebuild.

You would normally add your custom files simply under custom/modules/someModule/ …

Try fixing that and see if your problem goes away.

No, Still the same error popping up.

Also can we trigger the script by accessing the file via browser url
ex: suiteCRM/custom/modules/modulename/filename.php ?


No, it’s more complicated than that. You don’t just put new files in there and call them. The files have to fit in to the architecture, which is complex (highly configurable, self-writing program).

Normally when you customize, you start with an existing file, and just make small changes.

You need to learn how to develop for SuiteCRM, it’s not the same thing as merely developing with PHP.

I recommend Jim Mackin’s eBook “SuiteCRM for Developers”, you can buy it online.

Yes- I am following that book as well, I have created a scheduler stuff as said in the book.
There are couples of problems with that.

I don’t see the newly created scheduler when creating a scheduler via the admin->scheduler (i have done repair and rebuild,scheduler rebuild).

Also I would like to know how to trigger the scheduler manually via browser or some other. I tried to trigger with browser url by entring the file path, when I do that it shows fatal error file not found(topic of question)

Did you read the section on EntryPoints?

Yes… is there any connection between entrypoint and schedulers?

Well, the only connection is that if you want to trigger the scheduler job manually from a browser you’ll need to add it to the Entrypoints list and 'require’ing the entrypoint.php might help make available all the classes you need to include.

But I am not entirely sure of how to help you, I’m just looking for possible issues and solutions…