Link to home
Start Free TrialLog in
Avatar of mudcow007
mudcow007Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Crontab - .call file from asterisk for everyday?

hello all

can anyone explain how i can use the call file i have set up within asterisk to be used multiple times during the day ever day monday - friday

basically i need the file to be used @ 10:00, 10:15 an 11:00 monday to friday

does this look correct to run every 10 mins?

0,5,10 * * * *cp /var/spool/asterisk/alarm.call /var/spool/asterisk/outgoing/alarm.call

is this possible?

thanks
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

You would need 2 cron lines for this because you want 10:00, 10:15 and 11:00 but not 11:15

00 10,11 * * 1,2,3,4,5 cp /var/spool/asterisk/alarm.call /var/spool/asterisk/outgoing/alarm.call
15 10 * * 1,2,3,4,5 cp /var/spool/asterisk/alarm.call /var/spool/asterisk/outgoing/alarm.call

The first line would get you 10:00 and 11:00 on monday-friday (days 1-5)
The 2nd line would get you 10:15 on monday-friday (days 1-5)

Snippet from cron manual:

---
The time and date fields are:

           field         allowed values
           -----         --------------
           minute        0-59
           hour          0-23
           day of month  1-31
           month         1-12 (or names, see below)
           day of week   0-7 (0 or 7 is Sun, or use names)
---

Every 10 minutes on monday-friday would look like this:

00,10,20,30,40,50 * * * 1,2,3,4,5 ...
ASKER CERTIFIED SOLUTION
Avatar of Phonebuff
Phonebuff
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mudcow007

ASKER

thanks!