crontab not picking up multiple configs | General Questions and Support | Forum Archive

The free forums are no longer in use. It remains available as read-only archive.

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters – maximum search word length is 84 characters
The forums are currently locked and only available for read only access
sp_TopicIcon
crontab not picking up multiple configs
June 26, 2013
3:08 pm
Avatar
Wil
Member
Members
Forum Posts: 7
Member Since:
June 26, 2013
sp_UserOfflineSmall Offline

I run xcloner from a crontab, however, I can't seem to get it to pick up on any profiles.

Each time crontab runs it picks up on the default profile.

I've tried three variants.

 

1. /usr/bin/php /home/sites/hls.ie/public_html/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php /home/sites/hls.ie/public_html/wp-content/plugins/xcloner-backup-and-restore/configs/hls-hourly.php > /home/sites/hls.ie/public_html/administrator/backups/lcbackup.log 2>/home/sites/hls.ie/public_html/administrator/backups/lcbackup-errors.log

 

2. /usr/bin/php /home/sites/hls.ie/public_html/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php hls-hourly.php > /home/sites/hls.ie/public_html/administrator/backups/lcbackup.log 2>/home/sites/hls.ie/public_html/administrator/backups/lcbackup-errors.log

 

3. /usr/bin/php /home/sites/hls.ie/public_html/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php?config=hls-hourly.php > /home/sites/hls.ie/public_html/administrator/backups/lcbackup.log 2>/home/sites/hls.ie/public_html/administrator/backups/lcbackup-errors.log

 

Every one only picks up on the default config as per the log file:

 

X-Powered-By: PHP/5.3.26
Content-Type: text/html; charset=utf-8
Set-Cookie: auth_clone=1
<b>Using default configuration file</b><br />
<b>Starting /home/sites/hls.ie/public_html/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php</b><br />
<b>Starting XCloner for site http://www.hls.ie at 2013-06-26 16:00</b><br />

X-Powered-By: PHP/5.3.26Content-Type: text/html; charset=utf-8Set-Cookie: auth_clone=1

<b>Using default configuration file</b><br /><b>Starting /home/sites/hls.ie/public_html/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php</b><br /><b>Starting XCloner for site http://www.hls.ie at 2013-06-26 16:00</b><br />

 

I need to run one crontab which uploads to a hourly/daily S3 bucket and another which uploads to a weekly S3 bucket.

 

Can you tell me where I am going wrong please?

 

Wil.

June 26, 2013
5:32 pm
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

The correct custom config cron command should look like

 

/usr/bin/php /home/sites/hls.ie/public_html/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php hls-hourly.php

 

Hope it helps! Ovidiu

June 27, 2013
4:06 am
Avatar
Wil
Member
Members
Forum Posts: 7
Member Since:
June 26, 2013
sp_UserOfflineSmall Offline

Thanks for the response, however it's still not picking up the configuration file and using the default one.

 

Here's the crontab output log for the cron line you suggested.

/usr/bin/php /home/sites/hls.ie/public_html/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php hls-hourly.php

 As you can see it's still using the default configuration.

 

X-Powered-By: PHP/5.3.26
Content-Type: text/html; charset=utf-8
Set-Cookie: auth_clone=1
<b>Using default configuration file</b><br />
<b>Starting /home/sites/hls.ie/public_html/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php</b><br />
<b>Starting XCloner for site http://www.hls.ie at 2013-06-27 04:31</b><br />

X-Powered-By: PHP/5.3.26Content-Type: text/html; charset=utf-8Set-Cookie: auth_clone=1
<b>Using default configuration file</b><br /><b>Starting /home/sites/hls.ie/public_html/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php</b><br /><b>Starting XCloner for site http://www.hls.ie at 2013-06-27 04:31</b><br />

 

Wil.

June 27, 2013
5:11 am
Avatar
Wil
Member
Members
Forum Posts: 7
Member Since:
June 26, 2013
sp_UserOfflineSmall Offline

Hey there,

 

Just to let you know that it was an issue with the hosting environment.

 

They had tured off argv and argc for shared hosting so I had to pop register_argc_argv=true; in a php.ini file.

 

Perhaps you could do a quick check in cloner.cron.php to see if they are set and output a warning message if not.

 

Cheerz,

Wil.

Forum Timezone: America/Chicago
Most Users Ever Online: 867
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
mlguru: 30
Django29: 29
Andy: 21
D: 21
Marcus: 20
Jamie F: 19
Member Stats:
Guest Posters: 737
Members: 9955
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
Ich Meine
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0