Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects
Notifications
Clear all

Witty Pi 4 L3V7 clearing scheduler

6 Posts
2 Users
0 Likes
87 Views
(@andrew-simpson17)
Posts: 103
Estimable Member Customer
Topic starter
 

I can see apart from creating a schedule.wpi and placing my script inside it, that I can set the scheduler via ./wittyPi.sh.

If I add values this way I do not see a schedule.wpi with those new values inside it.

Which brings me to the 2nd part of my question.. is there a way to clear these entries? All I can see to do is option 12: reset data.
But obviously, this will reset everything.

 

thanks

 
Posted : 08/12/2024 4:02 pm
(@admin)
Posts: 507
Member Admin
 

Posted by: @andrew-simpson17

If I add values this way I do not see a schedule.wpi with those new values inside it.

What did you do exactly? Using wittyPi.sh to specify a schedule script is a standard way to use schedule script, are you saying it doesn't work for you?

 

If you check the source code, you can see the option 12 does three things. It clear the scheduled time by resetting some I2C registers and then delete the schedule.wpi file.

 

If you create a new schedule.wpi file and then run the "runScript.sh", it will take effect.

 
Posted : 09/12/2024 9:26 am
(@andrew-simpson17)
Posts: 103
Estimable Member Customer
Topic starter
 

@admin 

Hi

What did you do exactly? Using wittyPi.sh to specify a schedule script is a standard way to use schedule script, are you saying it doesn't work for you?

Typed ./wittyPi.sh

Added some dates/times.  

Exited menu/program

Looked in schedule.wpi file. These had the old values I had manually tpyed in still.

 

If you check the source code, you can see the option 12 does three things. It clear the scheduled time by resetting some I2C registers and then delete the schedule.wpi file.

Useful. I wil take a look. I am confident i will find what I need there. 

 

If you create a new schedule.wpi file and then run the "runScript.sh", it will take effect.

 

Yes, appreciate that.

 
Posted : 09/12/2024 10:35 am
(@admin)
Posts: 507
Member Admin
 

Posted by: @andrew-simpson17

Typed ./wittyPi.sh

Added some dates/times.  

Exited menu/program

wittyPi.sh doesn't have the ability to modify the schedule script file. You may use it to specify a new schedule script file, but not to edit the file directly.

 

 
Posted : 09/12/2024 10:38 am
(@andrew-simpson17)
Posts: 103
Estimable Member Customer
Topic starter
 

@admin Hi, using one of your samples - on 5 mins every 20 mins:

 

BEGIN 2015-08-01 00:00:00
END 2025-07-31 23:59:59
ON M5
OFF M15

 

I left it running. It turned off. Then, later it turned back on. But that was it. It just did it once.  Should it not be running the script?

 
Posted : 09/12/2024 1:33 pm
(@andrew-simpson17)
Posts: 103
Estimable Member Customer
Topic starter
 

Your function:

 

delete_schedule_script()
{
log ' Deleting "schedule.wpi" file...' '-n'
if [ -f "$my_dir/schedule.wpi" ]; then
rm "$my_dir/schedule.wpi"
log ' done :-)'
else
log ' file does not exist'
fi
}

 

Only deletes that file and nothing else?

 
Posted : 21/12/2024 10:59 am
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.