Trying to setup cron job Version 3.1.1, not working at all | Report Bugs | 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
Trying to setup cron job Version 3.1.1, not working at all
March 23, 2014
2:46 am
Avatar
John
Member
Members
Forum Posts: 12
Member Since:
July 10, 2013
sp_UserOfflineSmall Offline

I am running the latest, Version 3.1.1.  I've been trying to get cron working with XCloner.  I've been doing it manually, but for various reasons I'd like to automate it.  However, I keep getting errors.  All I get are errors in my inbox:

<h2>To run this script you need to create a custom config file inside XCloner Config, and call the script using php cli command like this:</h2>
<strong>php [redacted[/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php mycustomconfig.php</strong>
I even tried renaming the config file I created in the plugin Administration panel to "mycustomconfig.php" just in case the filename made a difference, but it does not.
Also, if I try to click on the link from the Administration panel, I get:

To run this script you need to create a custom config file inside XCloner Config, and call the script using php cli command like this:

php [redacted]/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php mycustomconfig.php

I saw where you directed another user to https://www.xcloner.com/support/forums/wordpress-support/cron-errors-here-after-3-1-update/#p10019, but I don't have that in the header of cloner.cron.php.

March 23, 2014
5:52 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

What is the cron command you are using to run the script? You simply need to replace it with the indicated one from that error message and it should be fixed, calling cloner.cron.php using a web address is not supported anymore, but you can remove the top lines if you like to skip that verification and replace it with something else.

 

Ovidiu

March 23, 2014
3:35 pm
Avatar
John
Member
Members
Forum Posts: 12
Member Since:
July 10, 2013
sp_UserOfflineSmall Offline

Like I said, I renamed the configuration php file so it matched the line as given in the error message exactly.

Also, I'll repeat that my cloner.cron.php does not have those lines in it, or at least they are nowhere near the top, but I cannot run run the command in any event, even by changing the command to http syntax, even if I click on the link in the admin panel, which obviously should be removed if it intentionally does not work that way.

March 23, 2014
5:30 pm
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Do you see these lines at the top?

 

if(!isset($argv[1]) ) { echo "<h2>".$topErrorLine1."</h2>\n"; echo "<strong>".$topErrorLine2."</strong>\n"; exit; }
March 23, 2014
8:15 pm
Avatar
John
Member
Members
Forum Posts: 12
Member Since:
July 10, 2013
sp_UserOfflineSmall Offline

OK, but that's different than what you had in the other post.  I searched for "stdin" and could not find it.

At any rate, commenting it out didn't seem to change anything.  It now reads:

 

$topErrorLine1 = "To run this script you need to create a custom config file inside XCloner Config, and call the script using php cli command like this:";
$topErrorLine2 = "php ".__FILE__." mycustomconfig.php";
//if( php_sapi_name() != 'cli' ){
/** if(!isset($argv[1]) ) {
echo  "<h2>".$topErrorLine1."</h2>n";
echo "<strong>".$topErrorLine2."</strong>n";
exit;
}
**/

 

Clicking on the link from the Admin panel sends me to http://www.johndscomputers.com/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php?config=mycustomconfig.php, which still gives me:

To run this script you need to create a custom config file inside XCloner Config, and call the script using php cli command like this:
php [redacted]/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php mycustomconfig.php

This makes no sense to me.  Just for grins, I put "//" in front of each line instead of using multiline /* ... */, and I don't see how it can even produce that error message.

If this functionality is truly going away and unsupported, it would still only be a temporary workaround, though.  At this point, however, neither of these methods work.  There is nothing odd about my setup, that I know of.  I'm running single site, PHP 5.4, MySQL 5.5.36-MariaDB, no caching plugins, etc.


March 24, 2014
6:17 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Again, to confirm, the cronjob will only work when running from a cron scheduler or command line and only when using the indicated command php [redacted]/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php mycustomconfig.php

 

If you still need help with this, feel free to open a support ticket and send me your site details so i can check the issue.

 

Regards, Ovidiu

March 24, 2014
2:17 pm
Avatar
John
Member
Members
Forum Posts: 12
Member Since:
July 10, 2013
sp_UserOfflineSmall Offline

OK, we were having a good old fashioned communications problem, it seems. Frown  From your previous posts, I was led to believe that taking those lines out were meant to allow it to overcome the restriction of running it in a browser, and I would be willing to bet I'm not the only one who thought that if they viewed some past articles on it.

Meanwhile, anyone else having this problem, I would suggest turning on SSH to your server, going to the secure shell login and running the "which php" command manually.  It seems that my host not only puts it in a different place than some others but their silly cron tool adds the wrong default location.  At very least, running the command that way shows whether or not for sure if it really works, and then steps can be taken from there.

Oh, and then if you no longer need SSH, turn it back off once it is working.

Laugh

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: 738
Members: 10030
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
Omar Vera
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0