[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/session.php on line 2184: Array to string conversion
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4511: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4512: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4513: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
Support Incident Tracker Forum • View topic - Adding action to scheduler?

Adding action to scheduler?

Discuss and get help with plugins. Share your ideas for future SiT! features.

Adding action to scheduler?

Postby skyrack_technology » Tue Jun 25, 2013 1:37 pm

Hi folks -
Anyone got advice, any guide somewhere, regarding generally what needs doing and where to add an action to the scheduler, and ideally then have it managed from the Scheduler GUI.

I want to add a Scheduled job to check automatically, once per day, on the state of expired contracts, so that we can then take some actions to de-provision service in other systems.

The expired contracts query is trivial, and I can poke that into an email.

I guess I could just insert some static code in the top of auto.php, and it will run with the cron job ? ... but then how do I get the details into the DB, or manage it through the GUI?

Cheers
Gavin
Happy Sitter!
skyrack_technology
SiT! Regular
SiT! Regular
 
Posts: 39
Joined: Tue Nov 16, 2010 4:57 pm

Re: Adding action to scheduler?

Postby Tomse » Tue Jun 25, 2013 2:59 pm

adding stuff to the scheduler is just like any other plugin

you just call sanction.

take a look at tms_backup
this plugin does all what you ask for.

interface for configuring, scheduled stuff, and interface to see result.
it also has a dashlet.

so remove the code within the functions, and rename the functions from tms_backup and you'll have a great template.
If you have a problem, give us enough info of what you have done, what is configured in relation to your question.
Enable debugging and post it's censored but relevant info. Don't forget to write which version of SiT you're running.
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 1137
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark

Re: Adding action to scheduler?

Postby skyrack_technology » Sun Jun 30, 2013 9:44 pm

Cheers Tomse, fast response as normal!
I'll try this when I get a chance!
skyrack_technology
SiT! Regular
SiT! Regular
 
Posts: 39
Joined: Tue Nov 16, 2010 4:57 pm

Re: Adding action to scheduler?

Postby Tomse » Tue Jul 02, 2013 11:29 pm

skyrack_technology wrote:Cheers Tomse, fast response as normal!


You've just been lucky that I've checked forum right after you've posted :lol: ..
I've actually been extremely busy these past months.

let me know if you need more indepth help, though I'll need to look at the code again (it's been ages)
If you have a problem, give us enough info of what you have done, what is configured in relation to your question.
Enable debugging and post it's censored but relevant info. Don't forget to write which version of SiT you're running.
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 1137
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark


Return to Plugins & Extending SiT!

Who is online

Users browsing this forum: No registered users and 1 guest

cron