Cannot get CRON working.
Cannot get CRON working.
I am a novice to the hah so please be gentle, I may have missed something obviouse to the expert eye.
I have followed the instructions in the cron wiki over and over, but still cannot get it to issue a command. The example I am using is as follows:-
05 14 * * * aliasmsg "rf.2 -s on".
I can get rf 2 to turn on from the command prompt with aliasmsg "rf.2 -s on".
I have enable cron in the services.
Do I have to use vi ? Or can I cut and paste directly into the crontab root file.
When I crontab –l, it all looks ok.
Any help would be much appreciated.
By the way:-
If I try # bscmsg, in the command prompt, i get the following error. I think this may be the same problem as issue 33.
/usr/bin/lua: /usr/share/lua/5.1/pl/lapp.lua:139: attempt to index upvalue 'types' (a nil value)
stack traceback:
/usr/share/lua/5.1/pl/lapp.lua:139: in function 'add_type'
/usr/bin/bscmsg:9: in main chunk
[C]: ?
I'm not sure about the syntax of your aliasmsg. I think it should be aliasmsg "rf 2 on" (no period between rf and 2 and no -s)
(I'm sure you have checked but) you should also ensure that you have the alias interpreter applet running.
The command crontab -e will open the root cron file in vi for you to edit directly.
Hope this helps.
It's been quite a while since I gave the cron thing a test, so I went back & tried it. All seems fine. As Allan says, the aliasmsg syntax that you quote is not correct - however, I'm sure that if you use the same aliasmsg command that works for you at the command line, it will be fine.
One other thought. Have you checked the datetime on your HAH box?
Here is the output from mine - I'm using NTP from 0.pool.ntp.org
# date
Sun Oct 20 16:13:10 BST 2013
I'm sure that if you presevere, it will come good.
Cheers,
Well, this is kinda in Brett's space but he is moving house (again) at the moment.
Have you checked that the cron daemon is actually running? It should show up as 'crond' if you run a 'ps' from the command line.
I'd recommend using vi directly. Using cut/paste (especially in Windows) can leave weird characters in files - this can upset things.
It's probably more longwinded but I've tended to use the xap-GoogleCal piece to perform 'timed events'.
Cheers,
Derek.