Count the number of results files on the server. #3248
Unanswered
holgerMitterer
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hi @holgerMitterer, This is going to require some kind of server-side program to run, like node or php. Client-side JS like jsPsych can't do this because it would be a security breach of the server. Do you know if PHP is installed on the server? That might be the easiest way to do it. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are running an experiment from populations that are not available on Prolific or similar sites, so we let participants run online and they can collect their reward at specific times in a specific place. The problem is that we want to stop the experiment if there are sufficient participants (and we can't run more because of we need to pay participants). Experiments are run on parts of the uni-server we have access to. The idea is to count the number of csv files in the data directory on the server, and if that is larger than (e.g.) 40, the timeline is changed to a single trial saying "Sorry, this experiment has gathered the required number of participants". However, I struggle to find a solution that simply counts the number of csv files on the server (i.e., in the subdir ./data to which csv files are written at the end of the study).
The solutions I find online do not work (since they require node.js, it is unclear to me how to get that working on the server), and my lack of familiarity with online programming make it difficult for me to understand what the best solution here is.
Any suggestions?
Kind regards,
Holger
Beta Was this translation helpful? Give feedback.
All reactions