How can I launch memcached on boot?
Presuming linux-ish cron (ISC cron aka vixiecron, actually),
will start memcached once at startup. man 5 crontab has more details.
Since you included cron as part of the question, I'm going to assume you are looking to do this on a UNIX or UNIXlike systems (Linux, *BSD, Solaris, etc). Although you could be trying to do this with cygwin.
This is not the normal method of starting services but it can be done. Running things from cron can be a way to ensure a critical service is restarted if it fails. You will need to write a wrapper script that checks if memcached is already running then starts it if it isn't. Then put entries in the cron.
The wrapper script will look in part like:
Some enhancements that you should consider for this would be a check to ensure that memcache is not only running but returning values to key requests. That is is a bit beyond the scope of your question.
Then call the full script from cron. A cron entry in /etc/crontab would look like
In a user cron it would look like
Most UNIX variants support the use of startup scripts. In SysV like systems like Solaris and Linux these are files named (servicename) stored in /etc/init.d with a link or symlink named S(nn)(servicename) in a directory like /etc/rc2.d, /etc/rc3.d, or /etc/rc5.d. In the BSD variants the script is stored under /usr/local/etc/rc.d or similar.
RHEL variants (RHEL, CentOS, Fedora, Scientific Linux, etc) can manage the scripts for you with a tool named chkconfig (chkconfig memcached on). Debian and ubuntu have a tool named update-rc.d (update-rc.d memcached defaults) Others have different methods.
Best Regards Rik
If its installed on Debian ( use rcconf ) or
If its installed on Redhat,Fedora,Centos,Suse
If its installed on windows..