This kind of approach usually works fine and in general, unless you're using specific IDE features in the script, we'd expect the execution time to be more-or-less the same.
I'd start by checking that you're using the same version of R/Rscript in both places - /bin/Rscript is often just the default version of R installed on the server and not necessarily the specific version you're using in the IDE.
You'll also want to make sure that you use appropriate Linux job control features such as nohup and & to ensure that the script continues running in the background even after you've logged off.
Above and beyond that, there's not usually much else to it. If the above don't help, it might be worth adding log messages (with timestamps!) to the script, so that you can try to isolate exactly what's going on. You could even include a sessionInfo() in the log output to dump out the current R version and attached package info, just to make sure everything looks good.