Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
007_mjn
Contributor

crontab bash script

Hi Team,

How to add crontab bash script to check when interface is down and it will send mail notification to my mail.

 

If anyone can help.

0 Kudos
11 Replies
Danny
Champion
Champion

Use the job scheduler.

0 Kudos
007_mjn
Contributor

Thanks....

How to verify with CLI that job scheduler is working?

0 Kudos
Danny
Champion
Champion

In expert mode just verify with this command: crontab -l

0 Kudos
007_mjn
Contributor

Hey @Danny it shows dummy comamnd.

I know you are master in writing script. 

I have write a bash script can you check it is correct or not?

The script is in file attachment.

 

0 Kudos
Danny
Champion
Champion

Looks like you asked ChatGPT to create those lines for you.

0 Kudos
007_mjn
Contributor

haha 

yes, you are right. I got this.

But do I need to setup MTA to get email?

0 Kudos
Danny
Champion
Champion

No, this is not required.

0 Kudos
007_mjn
Contributor

but there is a problem. I'm not getting email when interface is down.

I think email agent is important.

0 Kudos
007_mjn
Contributor

Hi @Danny 

when I run cron job it shows segmentation failed and generate a core dump.

0 Kudos
Danny
Champion
Champion

Then contact TAC (open a SR) to investigate it.
I don't recommend running ChatGPT generated Bash scripts on your gateways.

0 Kudos
007_mjn
Contributor

ok, thanks

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events