Newbie's problems understanding how Cron works

Re: Newbie's problems understanding how Cron works

Postby Jocko » Tue Sep 09, 2014 9:01 am

Hi Fuddyduddy,

Be careful, you made the same previous error with
* 12 */3 * *
that means :
Run the backup every 3 days at 12.00 but also 12:01, 12:02, ....
So you can note this behavior, the 1,4,7,10,13... day of at each month.

I advise to edit today your job by selecting also the value '0' in the minute drop-down list ;)
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Newbie's problems understanding how Cron works

Postby Fuddyduddy » Tue Sep 09, 2014 9:12 am

Thanks again Jocko - I've now done that.

You've also explained why 1200 has come, and gone, today without any backed-up folders appearing in the Destination folder, None will, I've now understood, before tomorrow 10th at 1200.

Meanwhile, could you please guide me in how I can zero the 'Backup' tab?
Fuddyduddy
Donator VIP
Donator VIP
 
Posts: 162
Joined: Thu Mar 14, 2013 9:00 am
Location: Åland Islands

Re: Newbie's problems understanding how Cron works

Postby Jocko » Tue Sep 09, 2014 12:56 pm

Fuddyduddy wrote:Meanwhile, could you please guide me in how I can zero the 'Backup' tab?
What do you mean with 'Backup' tab:
The progress backup table of the backup menu or the cron jobs table with some backup jobs ?
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Newbie's problems understanding how Cron works

Postby Fuddyduddy » Tue Sep 09, 2014 3:00 pm

Jocko wrote:What do you mean with 'Backup' tab:
The progress backup table of the backup menu or the cron jobs table with some backup jobs ?
Jocko

I mean the backup menu, but not the progress backup table. What I'm referring to is the part highest up on that page where the Source folder and Destination folder are able to be selected. What I'm finding is that they remain exactly as they were before I scheduled the backup that's already in the Jobs list.

I guess that if I shut down the fvdwsl network interface and re-started it that would zero-out whatever is entered there. But totally unfamiliar as I am with Cron I'm reluctant to do anything that might cause the cronjob I've scheduled to be deleted.

I wondered whether there isn't a better/approved way to clear an entry once the job has appeared in the Jobs List (it seems a bit crude to do it by shutting-down/re-starting - isn't there a better way?)
Fuddyduddy
Donator VIP
Donator VIP
 
Posts: 162
Joined: Thu Mar 14, 2013 9:00 am
Location: Åland Islands

Re: Newbie's problems understanding how Cron works

Postby Jocko » Tue Sep 09, 2014 3:35 pm

Fuddyduddy wrote:What I'm referring to is the part highest up on that page where the Source folder and Destination folder are able to be selected. What I'm finding is that they remain exactly as they were before I scheduled the backup that's already in the Jobs list.
This menu uses a session cache to keep the last values selected by the user after submitting.
This can can be useful if you want to create several backups from/to source or destination nearby between them.

And indeed you must close and open it again your browser to restore the default settings
But totally unfamiliar as I am with Cron I'm reluctant to do anything that might cause the cronjob I've scheduled to be deleted.
After validation, there is no connection between the cron menus and menu backup.
I wondered whether there isn't a better/approved way to clear an entry once the job has appeared in the Jobs List (it seems a bit crude to do it by shutting-down/re-starting - isn't there a better way?)
I think that you misunderstand what is the cron jobs table.
This table lists the settings for running the jobs but except when the datetime matches the scheduled time, the related jobs are not enabled.
So to remove one, just use the command "Update Jobs table : delete and/or disable jobs" after checking the related box in the "Delete" column (same thing to disable a job with the "disabled" column).

This remove the job settings for cron feature but doesn't stop a running job. If a job is running the only way to stop it, is to kill its process and then use a shell command in Putty...

But for the backups, you can also use the backup menu to stop any running backup.
if a backup job is running, you must see it in the backup progress table. Then, check the related box in the "Delete" column (or maybe "kill" I don't remember well) and click on "Abort the selected backups".
Be aware that when you abort a backup job, the job is not removed from the cron jobs table. You must also remove it from the cron jobs table otherwise if later the datetime matches again the scheduled time, the backup will run.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Newbie's problems understanding how Cron works

Postby Fuddyduddy » Tue Sep 09, 2014 6:02 pm

Jocko

Noted. Thanks again.
Fuddyduddy
Donator VIP
Donator VIP
 
Posts: 162
Joined: Thu Mar 14, 2013 9:00 am
Location: Åland Islands

Re: Newbie's problems understanding how Cron works

Postby Fuddyduddy » Wed Sep 10, 2014 12:17 pm

Hello Jocko

Unfortunately I still don't seem to have got the hang of this.

As reported yesterday, I scrapped the first cronjob and started again from scratch. I scheduled a new backup of the same source folder to the same destination folder as before, but set to be run at 1300 today 10th. (After your warning I selected '0' in the 'seconds' column, otherwise the job line was the same as the one I posted yesterday).

No job whatever so far as I can tell was carried out by Cron at that scheduled time, and I can't understand why not nor what else I should have done. Can you, I wonder?

EDIT
My mistake! The job I scheduled was for backing-up the other pair of folders that I've all along been aiming at. However the steps I took were exactly in accord with your instructions relating to the first pair so I can't see how the altered selection could cause Cron to fail to work as scheduled.

Meanwhile I've just scheduled the same backup again, timed for 1600 today. To avoid any doubt, here's the job line for that
Code: Select all
0 16 */3 * * /usr/bin/php '/share/1000/cronjobs/Rsync_USB-NAS_backup_1.from.Recorded_TV_lGgLc7.php' >>/share/1000/cronjobs/cron.log
Fuddyduddy
Donator VIP
Donator VIP
 
Posts: 162
Joined: Thu Mar 14, 2013 9:00 am
Location: Åland Islands

Re: Newbie's problems understanding how Cron works

Postby Jocko » Wed Sep 10, 2014 4:16 pm

Just a question.

Do you sure that cron feature is enabled ? :scratch

In the main Cron menu, you can see it bottom of the warning chapter
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Newbie's problems understanding how Cron works

Postby Fuddyduddy » Wed Sep 10, 2014 6:56 pm

Jocko

In the place I think you mean appears "Cron Scheduler: Enabled".

Also on that page the box "Activate Cron at each boot" is ticked.

Is there anywhere else I should look?
Fuddyduddy
Donator VIP
Donator VIP
 
Posts: 162
Joined: Thu Mar 14, 2013 9:00 am
Location: Åland Islands

Re: Newbie's problems understanding how Cron works

Postby Jocko » Wed Sep 10, 2014 7:39 pm

Do you try to see the cron log ?

Maybe there is an issue with the script.

So try to run it manually :
Open a Putty window and give these commands
Code: Select all
ls -al '/share/1000/cronjobs/Rsync_USB-NAS_backup_1.from.Recorded_TV_lGgLc7.php'
/usr/bin/php '/share/1000/cronjobs/Rsync_USB-NAS_backup_1.from.Recorded_TV_lGgLc7.php'

and see what is the output.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

PreviousNext

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 2 guests