|
|||
|
Possible to run auto-add cron task with WHM plugin?
Hello,
I am thinking about developing a WHM plugin, but it would need to run once every day. Is there a way to automatically add a task to cron when "installing" a plugin? The problem is that the target market of this plugin is newbie resellers and server owners.. and they might not be able to figure out how to add something to cron. (ie: It's hard enough to explain how to "install" a WHM plugin.. and asking them to fiddle with cron is very difficult. Thus, I'd prefer if there is some way to automate this step?) I hope that makes sense.
__________________
I am an eNom ETP. Sign up today if you want an eNom.com domain reseller account from a reliable provider. * We now provide support and service to over 3250 happy resellers!
|
|
||||
|
Quote:
Code:
/etc/cron.daily/
__________________
For hands-on assistance please reference our new support information page: Where should I go for support? cPResources: Support Options - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation -- cPanelDon - Donald Holl, Technical Analyst, cPanel Technical Support |
|
|||
|
Well, as plugins have no real unified installation method at this time there isn't a way to do this. However you could always do a touch file to check if it's run for the first time or not.
f.ex (pseudo code): if ( !-e /var/cpanel/$yourplugin/.notfirsttime ) { install cron do some setup stuff touch /var/cpanel/$yourplugin/.notfirsttime } |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to run plugin | kamlesh_chaube | cPanel Newbies | 1 | 06-01-2009 06:53 AM |
| Plugin run as root | abrender | Developer Discussions | 1 | 07-24-2008 09:34 AM |
| How to make an appointment a task in cron every 3 days? | romzinho | cPanel and WHM Discussions | 2 | 11-15-2007 05:42 PM |
| how to add a cron in whm | docesam | cPanel Newbies | 1 | 01-05-2007 12:45 PM |
| Cannot Schedule Cron Awstats Update Task | stewartn | cPanel and WHM Discussions | 1 | 05-13-2004 10:19 PM |