I have a dashboard and I want a process to run when the user clicks on a button. That process might take a long time to complete.
My options so far:
- using popen or something similar to execute the process
- having a daemon monitor a directory. When this directory is changed (a file created) the daemon will do the job and then delete the file before idling again.
- using cron, running every 5 seconds and also monitoring some directory.
Which one is more Linux-friendly? Is there any I have not considered?