-
Notifications
You must be signed in to change notification settings - Fork 8
Frequently asked questions
Yes. The run is not attached to your browser, it carries on in the background on the server until it finishes, or you stop it. Only one copy of your script can be running at a time. If you happen to log in while a scheduled run is happening, you'll be able to see it taking place.
Simply go to the "Code in your browser" tool and the output of the last time the script was run is in the console at the bottom. This applies whether it was run by hand or scheduled.
No, they're limited to an hour. You shouldn't need that long though! Write your scripts so that when they restart they get more data, rather than doing work they've already done. Then schedule them to run again every day or hour.
Only the last 10,000 lines are shown. This is to speed up how quickly it is shown. You can find the full log files in the file logs/out
if you SSH into the "Code in your browser" tool.
When your script exits without an error (i.e. exit code 0), the "Code in your browser" tool sets the ScraperWiki dataset status to "ok". If it exits with an error (if there's an exception, or otherwise a non-zero exit code) then it sets the status to "error". This status is shown on your data hub home page on the dataset.
First, SSH into the "Code in your browser" tool. You can do that from the cog settings menu for the tool. If this is the first time you've SSHd into ScraperWiki, follow the instructions to set up your keys.
Then you can use normal shell commands to browse round the tool. Your code is in the code
directory in the file scraper
. You can use any tool to edit the file, remember to reload in the browser editor afterwards though!
For more information about using SSH see the Develop on the box section of the Developer Docs.
Your code is all saved in a local git repository, automatically committed to each time you ran it. You'll need to SSH in and use the command line to access it, or ask ScraperWiki support for help.
$ cd code
$ git log
You can, if you know how to use git, add a remote and push that repository to github or similar.
Easiest way is:
- SSH into the box.
- Install the package locally:
pip install --user <packagename>
- SSH into the box.
- Run R by entering the command
R
- In R, enter the command:
install.packages('package_name_that_you_want_to_install
)` substituting in the name of the package you want to install. - R will prompt you with the warning:
'lib = "/usr/local/lib/R/site-library"' is not writable
and ask you if you want to use a personal library. Entery
to use a personal library. - Enter
y
when R asks you if you want to create a personal library to install packages into. - Choose a CRAN mirror: it doesn't matter too much which you pick. The package will then install.
Alternatively, before running R, you can SSH into the box, create a .Renviron
file in /home
that contains the line R_LIBS=/home/r_packages
and just do steps 2, 3 and 6 above. (This way, you've already specified that you want to use a personal library.)
Best place is on the ScraperWiki Google Group.