Reset board everyday at 5 am

Did you say hacking ?
morio
Member
Posts: 261
Joined: 02 Nov 2011 08:38

Re: Reset board everyday at 5 am

Post by morio »

hi, is there any one can help me with this post, can some one assist pls...


thanks
User avatar
oldboy
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 885
Joined: 25 Aug 2005 18:24

Re: Reset board everyday at 5 am

Post by oldboy »

morio wrote: 16 Aug 2022 05:49 hi, is there any one can help me with this post, can some one assist pls...


thanks
what do you need?
"Be aware ask a stupid question without at least trying to find the answer first you may get a stupid answer....."
morio
Member
Posts: 261
Joined: 02 Nov 2011 08:38

Re: Reset board everyday at 5 am

Post by morio »

hi OldBoy,
i need to restart GD3 boards on a weekly or daily basis to resolve a strange issue with analog extensions. im not aware of any script writing or anything. so if there is a way to schedule a re boot by script in oxe, can you guide me to it..

regs
Morio
sadim
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 692
Joined: 02 Jun 2006 07:11
Location: Portugal

Re: Reset board everyday at 5 am

Post by sadim »

Just add one of the following lines on the crontab using the command "crontab -e"
If every day at 2am
00 02 * * * /usr2/oneshot/mtcl/tool rstcpl Cr Cpl

If every monday at 2am
00 02 * * 0 /usr2/oneshot/mtcl/tool rstcpl Cr Cpl

Note that you must replace Cr and Cpl with the position of the GD that you want to restart
sadim
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 692
Joined: 02 Jun 2006 07:11
Location: Portugal

Re: Reset board everyday at 5 am

Post by sadim »

Correction:
the line
00 02 * * 0 /usr2/oneshot/mtcl/tool rstcpl Cr Cpl
is for every sunday
for every monday is:
00 02 * * 1 /usr2/oneshot/mtcl/tool rstcpl Cr Cpl
morio
Member
Posts: 261
Joined: 02 Nov 2011 08:38

Re: Reset board everyday at 5 am

Post by morio »

hi sadim
im getting the below stuff on telnet when i enter "crontab -e",,, what should i do,,
#********************************************************************#
# To modify this file please use crontab -e, cfgCron is now obsolete.#
# Please don't modify the PATH, if you want to add / modify #
# an instruction in this case you must indicate the complete path. #
# example : #
# Good : 0 * * * * /tmpd/essay/my_program > /tmpd/result.txt #
# Bad : 0 * * * * my_program > /tmpd/result.txt #
#********************************************************************#
PATH = /usr/bin/rsh2ssh:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
0,10,20,30,40,50 * * * * /DHS3bin/oneshot/mtcl/calllogupd > /tmpd/calllogupd.out 2>/tmpd/calllogupd.errs
0 * * * * /DHS3bin/servers/hotbascul >/tmpd/hotbascul.out 2>/tmpd/hotbascul.errs
30 1 * * * /DHS3bin/servers/fnclrpt -r >/tmpd/fnclrpt.out 2>/tmpd/fnclrpt.errs
0,10,20,30,40,50 * * * * /usr/sbin/logrotate -s /DHS3dyn/incid/logrotate.status /DHS3data/incid/logrotate.conf
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/tmp/crontab.XXXXikkbFk" 13 lines, 1013 characters
User avatar
oldboy
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 885
Joined: 25 Aug 2005 18:24

Re: Reset board everyday at 5 am

Post by oldboy »

You need enter the data as sadim has stated but be carful when you do it, basically you are running the vi command.

can i suggest you do a search on the vi command for linux to make sure you insert correctly and then also save and write the file correctly
"Be aware ask a stupid question without at least trying to find the answer first you may get a stupid answer....."
sadim
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 692
Joined: 02 Jun 2006 07:11
Location: Portugal

Re: Reset board everyday at 5 am

Post by sadim »

Hi,
As oldboy says, it is like vi.
But if you are not comfortable using the crontab command, you can perform the following sequence of commands
crontab -l > mycrontab
Note: on the next line do not forget to change Cr and Cpl by the GD position (ex: 2 0)
echo "00 02 * * 0 /usr2/oneshot/mtcl/tool rstcpl Cr Cpl" >> mycrontab
crontab mycrontab
Then, and in order to check if the crontab contents its ok:
crontab -l
morio
Member
Posts: 261
Joined: 02 Nov 2011 08:38

Re: Reset board everyday at 5 am

Post by morio »

hi,, thanks for the detailed info. i will try it and check.. thank you ''sadim and oldboy''
morio
Member
Posts: 261
Joined: 02 Nov 2011 08:38

Re: Reset board everyday at 5 am

Post by morio »

good news,
my trial worked. i set up to rest a cupler at 3 am and it works fine.
great thanks to all of you,

now one more thing. if i want to remove the line
00 02 * * * /usr2/oneshot/mtcl/tool rstcpl 0 3
or disable the auto reboot what should i do..

thanks again

regards
morio
Post Reply

Return to “System Hacking”