Crontab - .call file from asterisk for everyday?

Posted on 2012-09-07
Last Modified: 2012-09-27
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/ /var/spool/asterisk/outgoing/

is this possible?

Question by:mudcow007
    LVL 37

    Expert Comment

    by:Gerwin Jansen
    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/ /var/spool/asterisk/outgoing/
    15 10 * * 1,2,3,4,5 cp /var/spool/asterisk/ /var/spool/asterisk/outgoing/

    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 ...
    LVL 15

    Accepted Solution

    Or You can do this ---

    Every 10 minutes monday-friday could look like this:

    Min      H    DOM    M     DOW    CMD
    */10     *     *           *     1-5         ...


    Author Closing Comment


    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Article by: user_n
    How Sip Phone (User Agent) works and communicates with sip servers 1.  There is a sip server and a sip registrar.  The sip server and sip registrar can be one server or two different servers. The sip registrar is the server on which it is record…
    I recently purchased a Bluetooth headset called the Music Jogger (model BSH10). The control buttons on it look like this: One of my goals is to use it as the microphone and speakers for Skype calls. In that respect, it works well. However, I …
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now