How To Turn Scheduler On and Off with * code

I have setup a *925 to play a skywarn activated message and that works good in Hamvoip software.

Now I would like to setup a schedule to play the skywarn activated message when I activate it with a *980 and play once every 10 minutes until I enter another *981 to stop the skywarn is activated message.

I am not sure how to use Scheduler Enable COP 15 and Scheduler Disable COP 16 and have not been able to find much in searching the forum for the past years that I did the search in.

Maybe that is not even the best way to do it but I have been able to setup a macro 33 to play the message and I also was able to setup a schedule 33 to play at a certain time but not able to turn the schedule 33 on or off as I do not know how.

Is there anyone out there that knows how I can get this done.

Earl
W9EJH

Earl, While there is always more than one way to do anything with this stuff,
I might suggest the following…

Use tailmessage to do your deed. It has a squash to hold back the telemetry if someone is speaking.and to retry in a specified interval.

tailmessagetime=1800000 ; 20 minutes between tail messages
tailsquashedtime=300000 ; If squashed by another user, try again after 5 min
tailmessagelist= ;/etc/asterisk/msg/tailmsg1,/etc/asterisk/msg/tailmsg2

The problem with this is, it is always on.
To remedy this, you need to create a shell script that basically renames the file so it is not found when you want to disable it, and one more command to enable it by making it the correct file name again.

9080=cmd,/etc/asterisk/myscripts/tailenable.sh
9080=cmd,/etc/asterisk/myscripts/taildisable.sh

The script by example here would look something like this…

#!/bin/bash

mv /etc/asterisk/msg/tailmsg1 /etc/asterisk/msg/tailmsg0

eof

The reverse to enable in a script of it’s own.

Create and test your scripts first, then create the command in rpt.conf for them to run and test the command.

The tailmessagelist can be one or many files you should specify full path separated by a comma.
They will play in order if more than one and rotate to the begging if it has reached the end.

For what you are doing, I suggest only one.

…oh… don’t forget to set ownership and permissions of the script files.

Mike

Thanks for that answer I could also just have it rename my skyward activate and deactivate message for that matter, but just wanted to know how the schedule enable and disable work to see if I could just use that way.

Thanks for the idea as it did give me one but see if there is some where that the info is on how the schedule command works.

922=cop,15 ; Scheduler enable
923=cop,16 ; Scheduler disable

Mike
I have three schedules to turn on and off at different times with different messages depending three different activations it would then turn on and off all at the same time won’t it if I use the below method. is there a way to tun on say schedual 1 or 2 or 3. I could not find any documentation that talks about how to use this function.

922=cop,15=1 ; Scheduler 1 enable
923=cop,16=1 ; Scheduler 1 disable
924=cop,15=2 ; Scheduler 2 enable
925=cop,16=2 ; Scheduler 2 disable
maybe something like above I am sure that is not right but just trying to figure it out.
Earl
W9EJH

Earl, there is only one scheduler per node.
Now if yo have 2 nodes linked together, that’s one each. Of course you can’t run each others code.

Perhaps you are not very clear how the scheduler works.

Here is a page from the wiki

https://wiki.allstarlink.org/wiki/Scheduler_(ASL_System)

Mike

Thanks for your input and you are right I do not understand at all how the scheduler works, I will look at your first idea or maybe we just can not do what we need to do for turning 10 minute reminder that the Skywarn net is activated and to be able to turn it off once it is done with a star code.

Thanks for you of your input.
Earl
W9EJH

I think you will find what I proposed ideal for what you want to do.
However, I understand not everyone is comfortable working with shell scripts.
But a good chance to expand your horizons LOL

They are the most flexible way to work around the software.
Always here to help.
Let us know how you accomplish your task as it may help someone else.

I have fell and broke my back and pelvic so once I get back going again David I’ll get back to you thank you very much for all you’ve done

Earl
W9EJH

We are not going anywhere. Take care of yourself first.
Sorry, I don’t fix backs LOL