Hi!
I need some help.
I am trying to write a perl script that'll monitor the changes made to a directory; i am trying to schedule it on a Windows server using the task scheduler.
i would like the task to:
- start at 7 am everyday, send out an email to a group(sending the email is not the issue for me; i've coded that part fine...)
- listen for any directory changes using Win32::ChangeNotiy
- stop at 3PM and send out an email to a group again
Now, i have a couple of questions here
- is there an alarm event in perl? something like "it is 3PM now!" event that my code can listen to and then wake up from listening to directory change and send out an email? (I believe i cannot give a timeout in ChangeNotify->Wait method that'll ask the code to wake up at 3PM!!)
- if there is an alarm event, can my code listen to both the "directory change" event and the "it is 3PM" event at the same time and then handle whichever occurs first?
Thanks
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.