GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 7631bb...476136 )
by Liuta
02:36
created

Xcloner_Scheduler::xcloner_scheduler_callback()   B

Complexity

Conditions 5
Paths 5

Size

Total Lines 23
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 5
eloc 10
nc 5
nop 1
dl 0
loc 23
rs 8.5906
c 0
b 0
f 0
1
<?php
2
3
class Xcloner_Scheduler{
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
4
	
5
	private $db;
6
	private $scheduler_table = "xcloner_scheduler";
7
	
8
	private $xcloner_remote_storage;
9
	private $archive_system;
10
	private $xcloner_database;
11
	private $xcloner_settings;
12
	private $logger;
13
	private $xcloner_file_system;
14
	
15
	/*public function __call($method, $args) {
0 ignored issues
show
Unused Code Comprehensibility introduced by
60% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
16
		echo "$method is not defined";
17
	}*/
18
19
	public function __construct(Xcloner $xcloner_container)
20
	{
21
		global $wpdb;
0 ignored issues
show
Compatibility Best Practice introduced by
Use of global functionality is not recommended; it makes your code harder to test, and less reusable.

Instead of relying on global state, we recommend one of these alternatives:

1. Pass all data via parameters

function myFunction($a, $b) {
    // Do something
}

2. Create a class that maintains your state

class MyClass {
    private $a;
    private $b;

    public function __construct($a, $b) {
        $this->a = $a;
        $this->b = $b;
    }

    public function myFunction() {
        // Do something
    }
}
Loading history...
22
		
23
		$this->db 					= $wpdb;
24
		$wpdb->show_errors			= false;
25
		
26
		$this->xcloner_container	= $xcloner_container;
0 ignored issues
show
Bug introduced by
The property xcloner_container does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
27
		$this->xcloner_settings 	= $xcloner_container->get_xcloner_settings();
28
		
29
		$this->scheduler_table 		= $this->db->prefix.$this->scheduler_table;
30
	}
31
	
32
	private function get_xcloner_container()
33
	{
34
		return $this->xcloner_container;
35
	}
36
	
37
	public function get_scheduler_list($return_only_enabled = 0 )
38
	{
39
		$list = $this->db->get_results("SELECT * FROM ".$this->scheduler_table);
40
		
41
		if($return_only_enabled)
42
		{
43
			$new_list= array();
44
			
45
			foreach($list as $res)
46
				if($res->status)
47
				{
48
					$res->next_run_time = wp_next_scheduled('xcloner_scheduler_'.$res->id, array($res->id))+(get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
49
					$new_list[] = $res;
50
				}
51
			$list = $new_list;	
52
		}
53
		return $list;
54
	}
55
	
56
	public function get_next_run_schedule($xcloner_file_system = "")
0 ignored issues
show
Unused Code introduced by
The parameter $xcloner_file_system is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
57
	{
58
		$list = $this->get_scheduler_list($return_only_enabled = 1);
59
60
		return $list;
61
	}
62
	
63
	public function get_schedule_by_id_object($id)
64
	{
65
		$data = $this->db->get_row("SELECT * FROM ".$this->scheduler_table." WHERE id=".$id);
66
		
67
		return $data;
68
	}
69
	
70
	public function get_schedule_by_id($id)
71
	{
72
		$data = $this->db->get_row("SELECT * FROM ".$this->scheduler_table." WHERE id=".$id, ARRAY_A);
73
		
74
		if(!$data)
75
			return false;
76
		
77
		$params = json_decode($data['params']);
78
		
79
		//print_r($params);
80
		$data['params'] = "";
81
		$data['backup_params'] = $params->backup_params;
82
		$data['table_params'] = json_encode($params->database);
83
		$data['excluded_files'] = json_encode($params->excluded_files);
84
		
85
		
86
		return $data;
87
	}
88
	
89
	public function delete_schedule_by_id($id)
90
	{
91
		$hook =  'xcloner_scheduler_'.$id;
92
		wp_clear_scheduled_hook( $hook, array($id) );
93
		
94
		$data = $this->db->delete( $this->scheduler_table , array( 'id' => $id ) );
95
		
96
		return $data;
97
	}
98
	
99
	public function deactivate_wp_cron_hooks()
100
	{
101
		$list = $this->get_scheduler_list();
102
		
103
		foreach($list as $schedule)
104
		{
105
			$hook =  'xcloner_scheduler_'.$schedule->id;
106
			
107
			$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
108
			wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
109
		}
110
	}
111
	
112
	public function update_wp_cron_hooks()
113
	{
114
		$list = $this->get_scheduler_list();
115
		
116
		foreach($list as $schedule)
117
		{
118
			$hook =  'xcloner_scheduler_'.$schedule->id;
119
			
120
			//adding the xcloner_scheduler hook with xcloner_scheduler_callback callback
121
			add_action( $hook, array($this, 'xcloner_scheduler_callback'), 10,  1 );
122
			
123
			if ( ! wp_next_scheduled( $hook, array($schedule->id) ) and $schedule->status) {
0 ignored issues
show
Comprehensibility Best Practice introduced by
Using logical operators such as and instead of && is generally not recommended.

PHP has two types of connecting operators (logical operators, and boolean operators):

  Logical Operators Boolean Operator
AND - meaning and &&
OR - meaning or ||

The difference between these is the order in which they are executed. In most cases, you would want to use a boolean operator like &&, or ||.

Let’s take a look at a few examples:

// Logical operators have lower precedence:
$f = false or true;

// is executed like this:
($f = false) or true;


// Boolean operators have higher precedence:
$f = false || true;

// is executed like this:
$f = (false || true);

Logical Operators are used for Control-Flow

One case where you explicitly want to use logical operators is for control-flow such as this:

$x === 5
    or die('$x must be 5.');

// Instead of
if ($x !== 5) {
    die('$x must be 5.');
}

Since die introduces problems of its own, f.e. it makes our code hardly testable, and prevents any kind of more sophisticated error handling; you probably do not want to use this in real-world code. Unfortunately, logical operators cannot be combined with throw at this point:

// The following is currently a parse error.
$x === 5
    or throw new RuntimeException('$x must be 5.');

These limitations lead to logical operators rarely being of use in current PHP code.

Loading history...
124
				
125 View Code Duplication
				if($schedule->recurrence == "single")
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
126
					wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
127
				else	
128
					wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
129
					
130
			}elseif(!$schedule->status)
131
			{
132
				$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
133
				wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
134
			}
135
		}
136
	
137
	}
138
	
139
	public function update_cron_hook($id)
140
	{
141
		$schedule = $this->get_schedule_by_id_object($id);
142
		$hook =  'xcloner_scheduler_'.$schedule->id;
143
		
144
		$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
145
		wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
146
		
147 View Code Duplication
		if ($schedule->status) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
148
			
149
			if($schedule->recurrence == "single")
150
				wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
151
			else{	
152
				wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
153
			}
154
				
155
		}
156
}
157
	
158
	public function disable_single_cron($schedule_id)
159
	{
160
		$hook =  'xcloner_scheduler_'.$schedule_id;
161
		$timestamp = wp_next_scheduled( $hook , array($schedule_id) );
162
		wp_unschedule_event( $timestamp, $hook, array($schedule_id) );
163
		
164
		$schedule['status'] = 0;
0 ignored issues
show
Coding Style Comprehensibility introduced by
$schedule was never initialized. Although not strictly required by PHP, it is generally a good practice to add $schedule = array(); before regardless.

Adding an explicit array definition is generally preferable to implicit array definition as it guarantees a stable state of the code.

Let’s take a look at an example:

foreach ($collection as $item) {
    $myArray['foo'] = $item->getFoo();

    if ($item->hasBar()) {
        $myArray['bar'] = $item->getBar();
    }

    // do something with $myArray
}

As you can see in this example, the array $myArray is initialized the first time when the foreach loop is entered. You can also see that the value of the bar key is only written conditionally; thus, its value might result from a previous iteration.

This might or might not be intended. To make your intention clear, your code more readible and to avoid accidental bugs, we recommend to add an explicit initialization $myArray = array() either outside or inside the foreach loop.

Loading history...
165
		
166
		$update = $this->db->update( 
167
				$this->scheduler_table, 
168
				$schedule, 
169
				array( 'id' => $schedule_id ), 
170
				array( 
171
					'%s', 
172
					'%s' 
173
				) 
174
				);
175
		return $update;		
176
	}
177
	
178 View Code Duplication
	public function update_hash($schedule_id, $hash)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
179
	{
180
		$schedule['hash'] = $hash;
0 ignored issues
show
Coding Style Comprehensibility introduced by
$schedule was never initialized. Although not strictly required by PHP, it is generally a good practice to add $schedule = array(); before regardless.

Adding an explicit array definition is generally preferable to implicit array definition as it guarantees a stable state of the code.

Let’s take a look at an example:

foreach ($collection as $item) {
    $myArray['foo'] = $item->getFoo();

    if ($item->hasBar()) {
        $myArray['bar'] = $item->getBar();
    }

    // do something with $myArray
}

As you can see in this example, the array $myArray is initialized the first time when the foreach loop is entered. You can also see that the value of the bar key is only written conditionally; thus, its value might result from a previous iteration.

This might or might not be intended. To make your intention clear, your code more readible and to avoid accidental bugs, we recommend to add an explicit initialization $myArray = array() either outside or inside the foreach loop.

Loading history...
181
		
182
		$update = $this->db->update( 
183
				$this->scheduler_table, 
184
				$schedule, 
185
				array( 'id' => $schedule_id ), 
186
				array( 
187
					'%s', 
188
					'%s' 
189
				) 
190
				);
191
		return $update;		
192
	} 
193
	
194 View Code Duplication
	public function update_last_backup($schedule_id, $last_backup)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
195
	{
196
		$schedule['last_backup'] = $last_backup;
0 ignored issues
show
Coding Style Comprehensibility introduced by
$schedule was never initialized. Although not strictly required by PHP, it is generally a good practice to add $schedule = array(); before regardless.

Adding an explicit array definition is generally preferable to implicit array definition as it guarantees a stable state of the code.

Let’s take a look at an example:

foreach ($collection as $item) {
    $myArray['foo'] = $item->getFoo();

    if ($item->hasBar()) {
        $myArray['bar'] = $item->getBar();
    }

    // do something with $myArray
}

As you can see in this example, the array $myArray is initialized the first time when the foreach loop is entered. You can also see that the value of the bar key is only written conditionally; thus, its value might result from a previous iteration.

This might or might not be intended. To make your intention clear, your code more readible and to avoid accidental bugs, we recommend to add an explicit initialization $myArray = array() either outside or inside the foreach loop.

Loading history...
197
		
198
		$update = $this->db->update( 
199
				$this->scheduler_table, 
200
				$schedule, 
201
				array( 'id' => $schedule_id ), 
202
				array( 
203
					'%s', 
204
					'%s' 
205
				) 
206
				);
207
		return $update;		
208
	} 
209
	
210
	private function __xcloner_scheduler_callback($id, $schedule)
211
	{
212
		set_time_limit(0);
213
		
214
		$this->xcloner_file_system 		= $this->get_xcloner_container()->get_xcloner_filesystem();
215
		$this->xcloner_database 		= $this->get_xcloner_container()->get_xcloner_database();
216
		$this->archive_system 			= $this->get_xcloner_container()->get_archive_system();
217
		$this->logger 					= $this->get_xcloner_container()->get_xcloner_logger()->withName("xcloner_scheduler");
218
		$this->xcloner_remote_storage 	= $this->get_xcloner_container()->get_xcloner_remote_storage();
219
				
220
		if($schedule['recurrence'] == "single")
221
		{
222
			$this->disable_single_cron($schedule['id']);
223
		}
224
		
225
		if(!$schedule)
226
		{
227
			$this->logger->info(sprintf("Could not load schedule with id'%s'", $id), array("CRON"));
228
			return;
229
		}
230
		
231
		$this->update_hash($schedule['id'], $this->xcloner_settings->get_hash());
232
		
233
		$this->logger->info(sprintf("Starting cron schedule '%s'", $schedule['name']), array("CRON"));
234
		
235
		$this->xcloner_file_system->set_excluded_files(json_decode($schedule['excluded_files']));
236
		
237
		$init = 1;
238
		$continue = 1;
239
240
		while($continue)
241
		{
242
			$continue = $this->xcloner_file_system->start_file_recursion($init);
243
			
244
			$init = 0;
245
		}
246
		
247
		$this->logger->info(sprintf("File scan finished"), array("CRON"));
248
		
249
		$this->logger->info(sprintf("Starting the database backup"), array("CRON"));
250
		
251
		$init = 1;
252
		$return['finished'] = 0;
0 ignored issues
show
Coding Style Comprehensibility introduced by
$return was never initialized. Although not strictly required by PHP, it is generally a good practice to add $return = array(); before regardless.

Adding an explicit array definition is generally preferable to implicit array definition as it guarantees a stable state of the code.

Let’s take a look at an example:

foreach ($collection as $item) {
    $myArray['foo'] = $item->getFoo();

    if ($item->hasBar()) {
        $myArray['bar'] = $item->getBar();
    }

    // do something with $myArray
}

As you can see in this example, the array $myArray is initialized the first time when the foreach loop is entered. You can also see that the value of the bar key is only written conditionally; thus, its value might result from a previous iteration.

This might or might not be intended. To make your intention clear, your code more readible and to avoid accidental bugs, we recommend to add an explicit initialization $myArray = array() either outside or inside the foreach loop.

Loading history...
253
		
254
		while(!$return['finished'])
255
		{
256
			$return  = $this->xcloner_database->start_database_recursion((array)json_decode($schedule['table_params']), $return, $init);
257
			$init = 0;
258
		}
259
		
260
		$this->logger->info(sprintf("Database backup done"), array("CRON"));
261
		
262
		$this->logger->info(sprintf("Starting file archive process"), array("CRON"));
263
		
264
		$init = 0;
265
		$return['finished'] = 0;
266
		$return['extra'] = array();
267
		
268
		while(!$return['finished'])
269
		{
270
			$return = $this->archive_system->start_incremental_backup((array)$schedule['backup_params'], $return['extra'], $init);
271
			$init = 0;
272
		}
273
		$this->logger->info(sprintf("File archive process FINISHED."), array("CRON"));
274
		
275
		//getting the last backup archive file
276
		$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_with_extension();
277 View Code Duplication
		if($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension()))
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
278
				$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart();
279
		
280
		$this->update_last_backup($schedule['id'], $return['extra']['backup_parent']);
281
		
282
		if($schedule['remote_storage'] and array_key_exists($schedule['remote_storage'], $this->xcloner_remote_storage->get_available_storages()))
0 ignored issues
show
Comprehensibility Best Practice introduced by
Using logical operators such as and instead of && is generally not recommended.

PHP has two types of connecting operators (logical operators, and boolean operators):

  Logical Operators Boolean Operator
AND - meaning and &&
OR - meaning or ||

The difference between these is the order in which they are executed. In most cases, you would want to use a boolean operator like &&, or ||.

Let’s take a look at a few examples:

// Logical operators have lower precedence:
$f = false or true;

// is executed like this:
($f = false) or true;


// Boolean operators have higher precedence:
$f = false || true;

// is executed like this:
$f = (false || true);

Logical Operators are used for Control-Flow

One case where you explicitly want to use logical operators is for control-flow such as this:

$x === 5
    or die('$x must be 5.');

// Instead of
if ($x !== 5) {
    die('$x must be 5.');
}

Since die introduces problems of its own, f.e. it makes our code hardly testable, and prevents any kind of more sophisticated error handling; you probably do not want to use this in real-world code. Unfortunately, logical operators cannot be combined with throw at this point:

// The following is currently a parse error.
$x === 5
    or throw new RuntimeException('$x must be 5.');

These limitations lead to logical operators rarely being of use in current PHP code.

Loading history...
283
		{
284
			$backup_file = $return['extra']['backup_parent'];
285
			
286
			$this->logger->info(sprintf("Transferring backup to remote storage %s", strtoupper($schedule['remote_storage'])), array("CRON"));
287
			
288
			if(method_exists($this->xcloner_remote_storage, "upload_backup_to_storage"))
289
				call_user_func_array(array($this->xcloner_remote_storage, "upload_backup_to_storage"), array($backup_file, $schedule['remote_storage']));
290
		}
291
		
292
		
293
		if(isset($schedule['backup_params']->email_notification) and $to=$schedule['backup_params']->email_notification)
0 ignored issues
show
Comprehensibility Best Practice introduced by
Using logical operators such as and instead of && is generally not recommended.

PHP has two types of connecting operators (logical operators, and boolean operators):

  Logical Operators Boolean Operator
AND - meaning and &&
OR - meaning or ||

The difference between these is the order in which they are executed. In most cases, you would want to use a boolean operator like &&, or ||.

Let’s take a look at a few examples:

// Logical operators have lower precedence:
$f = false or true;

// is executed like this:
($f = false) or true;


// Boolean operators have higher precedence:
$f = false || true;

// is executed like this:
$f = (false || true);

Logical Operators are used for Control-Flow

One case where you explicitly want to use logical operators is for control-flow such as this:

$x === 5
    or die('$x must be 5.');

// Instead of
if ($x !== 5) {
    die('$x must be 5.');
}

Since die introduces problems of its own, f.e. it makes our code hardly testable, and prevents any kind of more sophisticated error handling; you probably do not want to use this in real-world code. Unfortunately, logical operators cannot be combined with throw at this point:

// The following is currently a parse error.
$x === 5
    or throw new RuntimeException('$x must be 5.');

These limitations lead to logical operators rarely being of use in current PHP code.

Loading history...
294
		{	
295
			try{
296
				$from = "XCloner Schedule - ".$schedule['name'];
297
				$additional['lines_total'] = $return['extra']['lines_total'];
0 ignored issues
show
Coding Style Comprehensibility introduced by
$additional was never initialized. Although not strictly required by PHP, it is generally a good practice to add $additional = array(); before regardless.

Adding an explicit array definition is generally preferable to implicit array definition as it guarantees a stable state of the code.

Let’s take a look at an example:

foreach ($collection as $item) {
    $myArray['foo'] = $item->getFoo();

    if ($item->hasBar()) {
        $myArray['bar'] = $item->getBar();
    }

    // do something with $myArray
}

As you can see in this example, the array $myArray is initialized the first time when the foreach loop is entered. You can also see that the value of the bar key is only written conditionally; thus, its value might result from a previous iteration.

This might or might not be intended. To make your intention clear, your code more readible and to avoid accidental bugs, we recommend to add an explicit initialization $myArray = array() either outside or inside the foreach loop.

Loading history...
298
				$this->archive_system->send_notification($to, $from, "", $return['extra']['backup_parent'], $schedule, "", $additional);
299
			}catch(Exception $e)
300
			{
301
				$this->logger->error($e->getMessage());
302
			}
303
		}
304
305
		$this->xcloner_file_system->remove_tmp_filesystem();
306
		
307
		$this->xcloner_file_system->backup_storage_cleanup();
308
	}
309
	
310
	public function xcloner_scheduler_callback($id)
311
	{
312
		$schedule = $this->get_schedule_by_id($id);
313
		
314
		try{
315
316
			$this->__xcloner_scheduler_callback($id, $schedule);
317
			
318
		}catch(Exception $e){
319
			
320
			//send email to site admin if email notification is not set in the scheduler
321
			if(!isset($schedule['backup_params']->email_notification))
322
				$schedule['backup_params']->email_notification = get_option('admin_email');
323
				
324
			if(isset($schedule['backup_params']->email_notification) and $to=$schedule['backup_params']->email_notification)
0 ignored issues
show
Comprehensibility Best Practice introduced by
Using logical operators such as and instead of && is generally not recommended.

PHP has two types of connecting operators (logical operators, and boolean operators):

  Logical Operators Boolean Operator
AND - meaning and &&
OR - meaning or ||

The difference between these is the order in which they are executed. In most cases, you would want to use a boolean operator like &&, or ||.

Let’s take a look at a few examples:

// Logical operators have lower precedence:
$f = false or true;

// is executed like this:
($f = false) or true;


// Boolean operators have higher precedence:
$f = false || true;

// is executed like this:
$f = (false || true);

Logical Operators are used for Control-Flow

One case where you explicitly want to use logical operators is for control-flow such as this:

$x === 5
    or die('$x must be 5.');

// Instead of
if ($x !== 5) {
    die('$x must be 5.');
}

Since die introduces problems of its own, f.e. it makes our code hardly testable, and prevents any kind of more sophisticated error handling; you probably do not want to use this in real-world code. Unfortunately, logical operators cannot be combined with throw at this point:

// The following is currently a parse error.
$x === 5
    or throw new RuntimeException('$x must be 5.');

These limitations lead to logical operators rarely being of use in current PHP code.

Loading history...
325
			{
326
				$from = "XCloner Schedule - ".$schedule['name'];
327
				$this->archive_system->send_notification($to, $from, "Scheduled backup error","", "", $e->getMessage());
328
			}
329
			
330
		}
331
		
332
	}
333
	
334
	
335
}
336