Kamran Arshad
asked on
Crontab error
Hi,
I am getting this error while editing the crontab?
crontab: installing new crontab
"/tmp/crontab.XXXXePsNSJ": 2: bad day-of-week
errors in crontab file, can't install.
Do you want to retry the same edit?
The crontab value is a below;
### recording mixing for Asterisk run every 5 minutes
1,6,11,16,21,26,31,36,41,4 6,51,56 * * *
1,2,3,4,5,6 /usr/share/astguiclient/AS T_CRON_mix _recording s_BASIC.pl
### keepalive script for astguiclient processes
* * * * * /usr/share/astguiclient/AD MIN_keepal ive_ALL.pl
### kill Hangup script for Asterisk updaters
* * * * * /usr/share/astguiclient/AS T_manager_ kill_hung_ congested. pl
### updater for voicemail
* * * * * /usr/share/astguiclient/AS T_vm_updat e.pl
### updater for conference validator
* * * * * /usr/share/astguiclient/AS T_conf_upd ate.pl
### flush queue DB table every hour for entries older than 1 hour
11 * * * * /usr/share/astguiclient/AS T_flush_DB queue.pl -q
### fix the vicidial_agent_log once every hour
33 * * * * /usr/share/astguiclient/AS T_cleanup_ agent_log. pl
### updater for VICIDIAL hopper
* * * * * /usr/share/astguiclient/AS T_VDhopper .pl -q
### adjust the GMT offset for the leads in the vicidial_list table
1 1 * * * /usr/share/astguiclient/AD MIN_adjust _GMTnow_on _leads.pl --
debug --postal-code-gmt
### reset several temporary-info tables in the database
2 1 * * * /usr/share/astguiclient/AS T_reset_my sql_vars.p l
### optimize the database tables within the asterisk database
3 1 * * * /usr/share/astguiclient/AS T_DB_optim ize.pl
## adjust time on the server with ntp
30 * * * * /usr/local/bin/ntpdate -u 18.145.0.30 2>/dev/null 1>&2
### VICIDIAL agent time log weekly summary report generation
2 0 * * 0 /usr/share/astguiclient/AS T_agent_we ek.pl
Your help is highly appreciated.
I am getting this error while editing the crontab?
crontab: installing new crontab
"/tmp/crontab.XXXXePsNSJ":
errors in crontab file, can't install.
Do you want to retry the same edit?
The crontab value is a below;
### recording mixing for Asterisk run every 5 minutes
1,6,11,16,21,26,31,36,41,4
1,2,3,4,5,6 /usr/share/astguiclient/AS
### keepalive script for astguiclient processes
* * * * * /usr/share/astguiclient/AD
### kill Hangup script for Asterisk updaters
* * * * * /usr/share/astguiclient/AS
### updater for voicemail
* * * * * /usr/share/astguiclient/AS
### updater for conference validator
* * * * * /usr/share/astguiclient/AS
### flush queue DB table every hour for entries older than 1 hour
11 * * * * /usr/share/astguiclient/AS
### fix the vicidial_agent_log once every hour
33 * * * * /usr/share/astguiclient/AS
### updater for VICIDIAL hopper
* * * * * /usr/share/astguiclient/AS
### adjust the GMT offset for the leads in the vicidial_list table
1 1 * * * /usr/share/astguiclient/AD
debug --postal-code-gmt
### reset several temporary-info tables in the database
2 1 * * * /usr/share/astguiclient/AS
### optimize the database tables within the asterisk database
3 1 * * * /usr/share/astguiclient/AS
## adjust time on the server with ntp
30 * * * * /usr/local/bin/ntpdate -u 18.145.0.30 2>/dev/null 1>&2
### VICIDIAL agent time log weekly summary report generation
2 0 * * 0 /usr/share/astguiclient/AS
Your help is highly appreciated.
ASKER
thanks for the comment. I have narrowed down the entries.. only below entries are wrong;
### adjust the GMT offset for the leads in the vicidial_list table
1 1 * * * /usr/share/astguiclient/AD MIN_adjust _GMTnow_on _leads.pl --
debug --postal-code-gmt
### recording mixing for Asterisk run every 5 minutes
1,6,11,16,21,26,31,36,41,4 6,51,56 * * *
1,2,3,4,5,6 /usr/share/astguiclient/AS T_CRON_mix _recording s_BASIC.pl
could you please tell what are the errors?
### adjust the GMT offset for the leads in the vicidial_list table
1 1 * * * /usr/share/astguiclient/AD
debug --postal-code-gmt
### recording mixing for Asterisk run every 5 minutes
1,6,11,16,21,26,31,36,41,4
1,2,3,4,5,6 /usr/share/astguiclient/AS
could you please tell what are the errors?
I can't see anything obvious, but I can tell you that
1,6,11,16,21,26,31,36,41,4 6,51,56 * * *
1,2,3,4,5,6 /usr/share/astguiclient/AS T_CRON_mix _recording s_BASIC.pl
is better written as
1/5 * * *
1-6 /usr/share/astguiclient/AS T_CRON_mix _recording s_BASIC.pl
1,6,11,16,21,26,31,36,41,4
1,2,3,4,5,6 /usr/share/astguiclient/AS
is better written as
1/5 * * *
1-6 /usr/share/astguiclient/AS
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Good call Tintin - those are the only two in the list that 'wrap' and seem to be the only two that are choking.
ASKER
sorry but I did not understand ...how can I correct it?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks folks...
http://books.google.com/books?id=Df7P1WyG87sC&pg=PA147&lpg=PA147&dq=/tmp/crontab:2:+bad+day-of-week&source=bl&ots=duQwpnGCGJ&sig=R7KsUaQdd7MZzVvLkQ7DktBljOI&hl=en&ei=diEvTPnaBIOKlwfQk93MCQ&sa=X&oi=book_result&ct=result&resnum=2&ved=0CBgQ6AEwAQ#v=onepage&q&f=false
Hopefully this will help you catch the issue.