Yes, I see. I will improve this, but the above code will not work as gtkdialog3 will not run pSchedule and I would switch the order to run gtkdialog if available. I assume that gtkdialog will be the latest.

Hi. Is there any way to save events entered into pschedule other than during the shutdown save. These days I'm just turning off the pc instead of going through normal shutdown to maintain the pup_save file unchanged. (also turned off periodic save). Of course this means that any pschedule events entered during the session are lost. Is there a way to force saving without a full pup_save save?

Thanks don570.
I pfound the usr/bin/crontab file but it had a gear icon and wouldn't open with geany as text so I kept looking. Another file found, var/spool/cron/crontabs/root, was happy to open with geany as text and showed my list of events. From there, I just used the normal drag/copy procedure to place a copy on my flash drive which can then be recopied back to the var/spool/cron/crontabs directory when needed.

I'm sort of wondering if the root file can be moved or linked to the flash drive I put my files on or if this will cause system confusion during startup - ie the period after startup but before the flash drive is mounted. Hmm. I'll probably just go with the simple solution but would appreciate any thoughts on the idea.

I have quite a few small scripts that I've put in my /root/Startup/ folder. Just write a simple script to do whatever it is you want, then when you're happy with it copy it to the Startup folder. It will be run each time you run Puppy.

Remember to set the executable attribute/permission flag (right-click it and check its "Properties). Also make sure the first line of the script is

It will restore the backup made last time this script ran (if it exists) and then start an endless loop that will make a backup of the current crontab every hour. Of course if you change your crontab and switch off your computer (without the standard shutdown sequence) before it has a chance to save the next backup then you'll still lose it. You could make the backup more frequent, but that shortens the life of flash memory if your storage is on flash drive. Or you could make the loop run faster with a delay of just 5 minutes, but check if the crontab has changed so that it only needs to be backued up if an alteration has been made. There are several ways you could check if the file has changed. Perhaps you could use the diff command.

Or maybe test the file with if [ -N /var/spool/cron/crontabs/root ] test to see if the file has been modified since it was last accessed (not sure if that would work because I don't know how often cron accesses the file).

Using diff would seem to be the easiest. Here is an example of how to test:

because diff doesn't print anything, so it is an empty string, if the two files are the same. But we want to do the copy if they are different -- that is, if the output of diff is not identical to "", so we use != which means not identical to. The backticks (`...`) around the diff command lets us run the command and insert the result into the test. It then has to be inside quotes so that it can be tested as a string.

You folks are totally incredible. I asked for 'thoughts' and you responded with invention and research galore. Wow, what puppies! It will take me awhile to digest and try all these ideas as there's a lot on my plate at the moment but I wanted to say thanks, I'm still here.

BTW, it occurs to me that this conversation is equally applicable to the browser's bookmarks and history files, which also disappear if I turn off without saving. Hmm. Maybe like that script miriam suggested??? Attached to a save icon on the desktop so one just clicks it before shutting down??? And a similar one for just after bootup??? (I'm trying to think if there are times when one might not want an automated script in the startup directory as suggested)

The sharing that people like to do if given a chance is one of the things that gives me great hope for humanity.

Some Puppy versions already use a save button to flush buffers and save settings in a flash-booted system. However, I think that if you do a controlled shutdown instead of simply switching off then that is effectively what the computer does -- it saves settings and unmounts flash drives after flushing buffers to them.

I find it annoying having to ask my computer to shut down, instead of just shutting it off, but these days it has its uses, especially when using blasted flash drives.

Flash drives are very convenient (compact, low power, high capacity, retain data without power), but are annoyingly fragile, requiring stuff to be written in large chunks instead of a byte at a time, which then means stuff is held back til enough is accumulated in a buffer to be written. As a result, pulling a flash drive out before a buffer is emptied to it leaves it, at worst corrupted, at best incomplete. I don't know why this is still a problem. Way back in the '80s when I used Amiga computers we had solved this. If a floppy disk was ejected in the middle of a write the Amiga put up a warning that the file hadn't been completely written and requested that you put the disk back in any drive, whereupon it resumed. We could have the same solution today, but all operating systems seem to have forgotten such old answers. [sigh]

Of course this is a problem for USB connections generally, not just flash drives. I'm currently repairing a large (1 terabyte) drive for a friend after it got corrupted when it was unplugged before a write completed. It was being used on MSWindows and formatted as NTFS (though Linux is not much safer). There is really no excuse for this kind of fragility. Maybe the next version of Linux's filesystem will be a partial solution.

Please excuse the rant. _________________A life! Cool! Where can I download one of those from?

Hi Miriam. I enjoyed your rant - should be brought to the attention of puppy or linux designers. The reason I avoid the regular shutdown save is to avoid the gradual deterioration in performance that seems to go along with that. So Instead of saving everything into the _save file, perhaps a menu could be provided with options of what to save outside the _save file. I'll be trying to get my noobrain around your script idea to set something up as soon as the dust settles around here.

Another thing I've wondered is if this nice little scheduler can be set up for common committee schedules such as every other Wednesday, third Thursday of the month, reminder every other hour (instead of hourly), etc.?

You could write a script containing a simple or not-so-simple list of what you want to do and invoke it on desired days using pschedule.

I think wed/2 in the day-of-week field will activate every second Wednesday. Best to read the documentation of cron (which is what pschedule is the front-end for). I'm not sure how you'd get cron (pschedule) to recognise the 3rd week of the month. I think there is a solution for the every-2nd-hour problem in the cron documentation.

I keep an enormous reference directory (about 1.5GB) on my computers containing all the manuals (in html format) along with examples, useful articles I've found on the web, all the HOWTO documents and my own notes. This is so I can quickly look up almost anything I want at a moment's notice whether I'm near a net-connection or not. It seems like a lot, but it easily fits on the smallest flash drive these days -- a massive reference library in the palm of my hand. _________________A life! Cool! Where can I download one of those from?

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum