Discussion:
Interactive perl based application who works as per schedule
Benjamin Fernandis
2014-10-09 09:19:34 UTC
Permalink
Hi,


I develop some scripts which we use with OS crontab to schedule to run
certain scripts. Scripts are for backup , VM on/off etc...

I want to integrate crontab function within perl script to do this.

Like a perl based daemon, which accepts date/time and action from users and
run according to that.

currently i define in cronjob

example : 10 10 * * * /opt/scripts/stop_vm.pl <VM_ID>


What is the better way to make it interactive with other team members , so
they can add/modify/remove schedule jobs with scripts.

I am thinking to make it as web based and different scripts which we are
currently using ( stop_vm.pl , start_vm.pl , backup.pl etc...), convert
them into module and then use those modules from main script which acts as
per schedule and complete certain task.

Please suggest me for this.

Regards
John SJ Anderson
2014-10-09 13:55:29 UTC
Permalink
Post by Benjamin Fernandis
Hi,
Hi!

[ snip ]
Post by Benjamin Fernandis
Please suggest me for this.
I suggest you don't try to re-invent cron. Cron works. Cron is a known
quantity. You don't need to re-invent cron.

What you need is a way to let other people edit crontab files, with a
better UI. So make a Perl web application. Require authentication --
tie it into your AD or LDAP or whatever -- and provide a UI that
writes out a crontab file based on the users input.

Then have a cronjob that runs every minute that looks at those crontab
files, detects when one has been changed, and reloads it.

chrs,
john.
--
To unsubscribe, e-mail: beginners-***@perl.org
For additional commands, e-mail: beginners-***@perl.org
http://learn.perl.org/
Christopher Brenk
2014-10-09 14:26:46 UTC
Permalink
Hi!

I just read a article on perltricks.com about every. It's an application
written in Perl,which provides a interface to cron.

http://perltricks.com/article/55/2013/12/22/Schedule-jobs-like-a-boss-with-every

Maybe you want to use it in your (web-)application.

Mit freundlichen GrÌßen,
Christopher Brenk.
Post by John SJ Anderson
Post by Benjamin Fernandis
Hi,
Hi!
[ snip ]
Post by Benjamin Fernandis
Please suggest me for this.
I suggest you don't try to re-invent cron. Cron works. Cron is a known
quantity. You don't need to re-invent cron.
What you need is a way to let other people edit crontab files, with a
better UI. So make a Perl web application. Require authentication --
tie it into your AD or LDAP or whatever -- and provide a UI that
writes out a crontab file based on the users input.
Then have a cronjob that runs every minute that looks at those crontab
files, detects when one has been changed, and reloads it.
chrs,
john.
--
http://learn.perl.org/
Benjamin Fernandis
2014-10-09 21:46:24 UTC
Permalink
Thanks,

I will follow those.

Regards

On Fri, Oct 10, 2014 at 3:26 AM, Christopher Brenk <
Post by Christopher Brenk
Hi!
I just read a article on perltricks.com about every. It's an application
written in Perl,which provides a interface to cron.
http://perltricks.com/article/55/2013/12/22/Schedule-jobs-like-a-boss-with-every
Maybe you want to use it in your (web-)application.
Mit freundlichen GrÌßen,
Christopher Brenk.
Post by John SJ Anderson
Post by Benjamin Fernandis
Hi,
Hi!
[ snip ]
Post by Benjamin Fernandis
Please suggest me for this.
I suggest you don't try to re-invent cron. Cron works. Cron is a known
quantity. You don't need to re-invent cron.
What you need is a way to let other people edit crontab files, with a
better UI. So make a Perl web application. Require authentication --
tie it into your AD or LDAP or whatever -- and provide a UI that
writes out a crontab file based on the users input.
Then have a cronjob that runs every minute that looks at those crontab
files, detects when one has been changed, and reloads it.
chrs,
john.
--
http://learn.perl.org/
Loading...