Need a script to restart Chron (Solved)

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
User avatar
theroar84
Posts: 95
Joined: Sat May 08, 2021 4:21 pm
Location: US
Has thanked: 48 times
Been thanked: 20 times
Contact:

Need a script to restart Chron (Solved)

Post by theroar84 »

I have created a chron schedule that I use on a few PC's with multiple Fossa64 frugal installs per pc. I created a script that will copy the new root into the chron folder. Works like a champ, but I have found that the previous chron schedule still runs until I reboot.

Is there a restart chron command that I can add to my script that copies the updated schedule for me?

This is the code I currently have in the script. When I have a new root (schedule) I just paste it into the sd card folder for updating.

cp -afT /mnt/sdb1/1a/nroot/ /var/spool/cron/crontabs/

I did a search for restart chron cmd line and a few other iterations but came up empty. Thanks for your time. 👍

Running Fossa64 9.5 Multiple PC's Frugal Installs on EXT4 hard drives. Multiple Frugals per PC too.

User avatar
rockedge
Site Admin
Posts: 6817
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2968 times
Been thanked: 2793 times
Contact:

Re: Ghost Chron or Restart Chron Script

Post by rockedge »

is there a utility here: Menu->System->Pschedue?

Pschedule is a GUI front-end to set up and manage cron jobs. Might make it easier to use than the command line.

Both methods will work but I have not setup and used cron jobs from the command line in a long time so my tip is try Pschedule

User avatar
Trapster
Posts: 201
Joined: Sat Aug 01, 2020 7:44 pm
Location: Texas
Has thanked: 1 time
Been thanked: 61 times

Re: Ghost Chron or Restart Chron Script

Post by Trapster »

Most puppies I've seen use

Code: Select all

/etc/rc.d/init.d/crond restart

also

Code: Select all

/etc/rc.d/init.d/crond start

Code: Select all

/etc/rc.d/init.d/crond stop
HerrBert
Posts: 364
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 19 times
Been thanked: 135 times

Re: Ghost Chron or Restart Chron Script

Post by HerrBert »

To update edited cronjobs i use echo root > /var/spool/cron/crontabs/cron.update
Works from terminal or script.

User avatar
theroar84
Posts: 95
Joined: Sat May 08, 2021 4:21 pm
Location: US
Has thanked: 48 times
Been thanked: 20 times
Contact:

Re: Ghost Chron or Restart Chron Script

Post by theroar84 »

Thanks for all the input. Pschedule is slick, but I like being able to take my working root and just move it to the other Pupsaves.

Will see which tips work better for me. Thanks Herrbert and Trapster for the options!

Running Fossa64 9.5 Multiple PC's Frugal Installs on EXT4 hard drives. Multiple Frugals per PC too.

Post Reply

Return to “Beginners Help”