Page 1 of 1

Simulation automatique

Posted: Thu Sep 23, 2010 9:54 am
by gab_3020
Salut Simon,

J'utilise la fonction ''Auto'' pour le sim depuis 2 saison avec la V1.

Je commence alors ma pré-saison en V2 et rien ne fonctionne tout plein d'erreurs qui pop...

J'ai aussi une question par rapport à sa.

Si j'ai de cocher le download lines et l'upload automatique du output et du csvxml (dans la section ftp), est-ce que c'est supposer le faire avec la fonction auto?

Parce que selon le manuel, sa ne fait que faire le autoload lines interne. Et selon mes tests de hier, sa ne download rien du site. Alors il faudrait que je fasse un script encore? Puisque la fonction est deja présente avec le sim comme tel, serait-ce possible d'ajouter cette fonctionalité avec la fontion Auto si les 3 sont cochés? Sa éviterais beaucoup de chose et toute devient réellement automatique.

Merci!

Re: Simulation automatique

Posted: Thu Sep 23, 2010 12:20 pm
by ynohtna
what? running the sim from the command line doesn't do the FTP stuff?

Re: Simulation automatique

Posted: Thu Sep 23, 2010 1:06 pm
by gab_3020
Not sure what you mean there...

Just to put you in context, I have a scheduled task on my computer to run the STHS once a day at X hour.

Once that goes, it sims for you. With V1, I had scripts running that would download the lines from the server and afterwards upload the output and csvxml to the server.

With V2, that option is already there but it doesn't seem to work if you're running a scheduled task (meaning using ''.../sthsV2.exe Auto'').

I basically am a GM except for entering trades and changing positions. the bulk of the work is done at the beginning of the season and the end. Other than that, I spend 4 months being a GM and having simulations everyday at exactly the same time. Quite a feature that Simon put in there.

With my test yesterday, It did not download the lines from my server neither did it upload anything. Also, the STHS went crazy with errors so it obviously didn't help.

Re: Simulation automatique

Posted: Thu Sep 23, 2010 5:04 pm
by SimonT
Technically, FTP Upload and Download should work with the ''.../sthsV2.exe Auto'' command.

Where you succesfull in running the FTP Upload and Download when running the STHS in normal mode?

Re: Simulation automatique

Posted: Thu Sep 23, 2010 5:09 pm
by ynohtna
I'm the same... I have a scheduled task for a script that downloads lines and uploads output files. This is V1 and worked quite well.

In V2, I have some issue to sort out for FTP, but I haven't tested my scripts yet. I do want to have GM use the client to upload lines and the simulator to download the lines, but the upload of output files will have to be with my scripts. I really hope I don't have errors each time I run the sim via command line.

Re: Simulation automatique

Posted: Thu Sep 23, 2010 5:57 pm
by gab_3020
Ok so we're the same (very nice to have, any commish not doing that is wasting a lot of time (it takes a bit of knowledge or someone that has some knowledge around you))

By the way, do you use the portal? Because my csvxml, once u0ploaded to the proper path, needed to be 'decoded' otherwise the files were there, just not updating the site... (so the previous sim was still on the portal)

The function Upload all files never worked for me also, same porblem... files are there... just not updating the site... I suspect it's related and if I fix one, the other will work.

Pour Simon,

Je vais retenter ma chance ce soir, je garde au courant via ce topic.

Re: Simulation automatique

Posted: Thu Sep 23, 2010 6:37 pm
by ynohtna
I need SFTP for my site but already had and finish that discussion with simon :)

I'm not using portal, but I plan to devise a method to load the csv and xml and start added that code to my site. A lot more neat stuff you can do that just displaying the html.

I only started my league because finally STHS became more automated enough for me to deal with. I don't have time to babysit it. It needs to be cruise control.

Re: Simulation automatique

Posted: Thu Sep 23, 2010 7:59 pm
by gab_3020
bon jai fait une coupe d'affaire dans le sim (transactions, changement position, etc...) pour ensuite faire un output manuel et voici ce que sa me donne (j'ai les 3 cases pour le ftp de cocher et j'ai tester ma connection et sa fonctionne...

voici ce que sa me donne comme erreur environ 20 fois de suite (J'ai retranscrit a la main mais je crois avoir tout bien retranscris, les printscreen ont pas l'air à se copier dans le forum donc...)
Exception type
-------------------------------------
System.Net.WebException

Message - Source
-------------------------------------
The remote server returned an error : (503) Bad sequence of commands. - System

Stack Trace
-------------------------------------
at System.Net.FtpWebRequest.SyncRequestCallback(Object obj)
at System.Net.FtpWebRequest.RequestCallback(Object obj)
at System.Net.CommandStream.InvokeRequestCallback(Object obj)
at System.Net.CommandStream.Abort(Exception e)
at System.Net.FtpWebRequest.FinishRequestStage(RequestStage stage)
at System.Net.FtpWebRequest.GetRequestStream()
at SimonTHockeySimulator.SimonT.FtpUpload(String strSitePathFile, String strLocalFile, Boolean booAnonymous, String strUsername, String strPassword, Boolean booVerbose, Boolean booDeleteOriginal)
Pis sa prend environ 30 minute clairer les boites de dialogue d'erreur qui vienne en plein milieu de presque chaque fichier du output...

Feck non seulement c'est plate, mais je suis completement bloquer du sths pendant 30 minutes

Une idée?

Re: Simulation automatique

Posted: Thu Sep 23, 2010 8:14 pm
by gab_3020
J'ose pas simuler manuellement non plus ya des bonne chance que sa plante (tant que les cases pour le ftp sont cochés)

Re: Simulation automatique

Posted: Thu Sep 23, 2010 9:05 pm
by SimonT
It seem the FTP Servers is not accepting the standard FTP command.

If you want me to bug it, send me your league with the FTP information save in it.

Re: Simulation automatique

Posted: Thu Sep 23, 2010 10:25 pm
by gab_3020
File sent, please use second e-mail if you didn't start with the first one!

Re: Simulation automatique

Posted: Fri Sep 24, 2010 6:54 pm
by SimonT
Pour moi, tout fonctionne 100%. Je suis capable uploader un fichier par le STHS Client. Comme tu as m’envoyé ton fichier client seulement, je ne peux pas tester le download.

Re: Simulation automatique

Posted: Sun Sep 26, 2010 11:18 am
by gab_3020
dsl, je em suis trompé, je t'envoi le fichier de la ligue dans 15 minutes

Re: Simulation automatique

Posted: Sun Sep 26, 2010 4:37 pm
by SimonT
Après des test, j’ai ton erreur 1 fois sur 5-6 fois environs. Par contre, je me comprend pas pourquoi. Mon code demande un listing du répertoire pis ton serveur répond avec cette erreur au lieu du listing.

Si tu n’as pas d’erreur, tu peux utiliser la fonction « upload » du simulateur pour envoyer les résultats de simulation sur le serveur mais tu ne pourras pas téléchargé les fichiers client du serveur FTP par le STHS. Dsl.