Executing a scheduled job manually

Hi there, I’ve a question concerning the job scheduler:

During the development of custom scheduler jobs I’ve always have to wait for the job scheduler to trigger a job.
I’m looking for a way to trigger a custom job manually during development: But as a constraint the Job Log should be written as it would run through the cron.php.
I can run it with a script, but it fires the job directly circumventing the Job Scheduler completely.

An optimal solution would be a button right to the Scheduler Job Entry List View titled ‘Run Now’, which would trigger the Job instantly through the web interface.

Do you have any ideas?

Thank you in advance

Have you tried simply running cron.php from the command line?

If your job is set to run as frequently as possible, that might work. But I know there is a mechanism to “throttle” jobs so they don’t run too frequently, so you might want to comment out that part of cron.php.

Coming back to revive this topic. I know you can run the cron.php job manually through the command line. But, what if you just want to manually run a “specific” job? Not just all of the jobs but one specifically?

Is there a way to do this? Either from the command line or someway else?

If you have scheduler defined and this addon, then I guess you can run the it.

1 Like

Did you try to copy and paste single job from the crontab and run on the command line?

That looks like an awesome plugin! Definitely will have to check that one out. But, I actually need to be able to call this from a separate external process (i.e. another php page that is not a part of the SuiteCRM)

I did just try and run it by directly accessing it but it didn’t work (and rightfully so since it would need to be an entry point).
I am thinking about possibly exposing a call via the api that could call the scheduled job directly and just do it that way?