wtshing
Posts: 8
Joined: Wed Jan 31, 2018 3:52 pm

Run input from U.I. and create cron job

Wed Mar 21, 2018 2:58 pm

Hi,

I connected the pi (e.g. 192.168.0.1) with my ubuntu server (e.g. 192.168.0.2), and now it's able to use the website hosted by the ubuntu to perform tasks, such as turn on & off led/ read data from sensors.

I want to ask, is it possible to read the data inputted by user and modify the cron job, so that user can create & delete/ enable & disable scheduled one-time or repetitive tasks?

Thanks all!

wh7qq
Posts: 1480
Joined: Thu Oct 09, 2014 2:50 am

Re: Run input from U.I. and create cron job

Wed Mar 21, 2018 4:58 pm

Cron definitely allows users to edit cron jobs to start and stop running programs and do scheduled tasks based on scripts. The best approach is to use

Code: Select all

crontab -e
from the command line but that requires that you choose and use a text based editor such as nano. "Gnome schedule" is a GUI
means of editing cron jobs if you are command line adverse. Cron takes a bit of study to get the times and commands parsed properly but it is worth the trouble.

wtshing
Posts: 8
Joined: Wed Jan 31, 2018 3:52 pm

Re: Run input from U.I. and create cron job

Thu Mar 22, 2018 6:57 am

I know cron job can perform the scheduling task features. However, can users modify the cron job file via the user interface (e.g. the website hosted by the ubuntu server 16.04 which is connected to the pi) instead of using putty or other command lines.

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Run input from U.I. and create cron job

Thu Mar 22, 2018 8:06 am

http://lifepluslinux.blogspot.de/2017/0 ... ry-pi.html

Google keywords : "crontab webinterface". Note that cron is a quite powerful tool. Exposing it via a webserver should be always done carefully.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “General discussion”